| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96860 is a reply to message #95665] |
Mon, 19 March 2012 19:51   |
Viking  Messages: 245 Registered: July 2010 |
Senior Member |
|
|
mustafaramadhan wrote on Thu, 01 March 2012 18:12Related to http://forum.lxcenter.org/index.php?t=msg&th=18021
Install to production system is your own risk.
Already on github as fork by me.
How to install this version:
1. Make Kloxo pack
# create custom repo
echo '[kloxo-centalt]' > /etc/yum.repos.d/kloxo-custom.repo
echo 'name=kloxo-centalt - $basearch' >> /etc/yum.repos.d/kloxo-custom.repo
echo 'baseurl=http://centos.alt.ru/repository/centos/5/$basearch/' >> /etc/yum.repos.d/kloxo-custom.repo
echo 'enabled=1' >> /etc/yum.repos.d/kloxo-custom.repo
echo 'gpgcheck=0' >> /etc/yum.repos.d/kloxo-custom.repo
echo 'includepkgs=nginx mod_rpaf' >> /etc/yum.repos.d/kloxo-custom.repo
echo ' ' >> /etc/yum.repos.d/kloxo-custom.repo
echo '[kloxo-rpmforge]' >> /etc/yum.repos.d/kloxo-custom.repo
echo 'name=kloxo-rpmforge - $basearch' >> /etc/yum.repos.d/kloxo-custom.repo
echo 'baseurl=http://apt.sw.be/redhat/el5/en/$basearch/rpmforge' >> /etc/yum.repos.d/kloxo-custom.repo
echo 'enabled=1' >> /etc/yum.repos.d/kloxo-custom.repo
echo 'gpgcheck=0' >> /etc/yum.repos.d/kloxo-custom.repo
echo 'includepkgs=mod_fastcgi' >> /etc/yum.repos.d/kloxo-custom.repo
# delete if exist
rm -rf /tmp/kloxo
# create kloxo temp dir
mkdir /tmp/kloxo ; cd /tmp/kloxo
# get kloxo packer from github
wget https://github.com/mustafaramadhan/kloxo/raw/dev/kloxo-install/kloxo-packer.sh --no-check-certificate
2.a For fresh install (Kloxo no exist)
# get kloxo fork from github
sh kloxo-packer.sh --fork=mustafaramadhan --branch=dev
# install kloxo
sh kloxo-installer.sh --type=master
# better reboot
reboot
These steps install the version 6.1.12. Do not install version 6.2.0.
In /home/nginx/conf/domains/mydomain.com.conf nginx should not be:
### begin content - please not remove this line
## web for 'mydomain.com'
server {
listen xx.xx.xx.xx:80;
listen xx.xx.xx.xx:443;
server_name mydomain.com www.mydomain.com;
index index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl;
set $domain 'mydomain.com';
# location / {
# rewrite ^/(.*) 'http://www.mydomain.com/$1' permanent;
# }
set $rootdir '/home/user/mydomain.com';
root $rootdir;
set $user 'user';
include '/home/nginx/conf/globals/generic.conf';
include '/home/nginx/conf/globals/proxy.conf';
}
## webmail for 'mydomain.com' handled by ../webmails/webmail.conf
### end content - please not remove this line
Because redirected to the www nginx-proxy does not work.
Redirection www is done by:
/home/apache/conf/domains/mydomain.conf
### begin content - please not remove this line
## web for 'mydomain.com'
<VirtualHost \
xx.xx.xx.xx:30080 xx.xx.xx.xx:30443\
127.0.0.1:30080\
>
ServerAdmin webmaster@mydomain.com
ServerName mydomain.com
ServerAlias www.mydomain.com
# RewriteEngine On
# RewriteCond %{HTTP_HOST} ^my\.domain\.com$ [NC]
# RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^my\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com$1 [R=301,L]
DocumentRoot "/home/user/mydomain.com/"
DirectoryIndex index.php index.html index.shtml index.htm default.htm Default.aspx Default.asp index.pl
<IfModule suexec.c>
SuexecUserGroup user user
</IfModule>
<IfModule mod_suphp.c>
SuPhp_UserGroup user user
suPHP_Configpath "/home/httpd/mydomain.com/"
</IfModule>
<IfModule mod_ruid2.c>
RMode config
RUidGid user user
RMinUidGid user user
</IfModule>
<IfModule itk.c>
AssignUserId user user
<Location /awstats/>
AssignUserId lxlabs lxlabs
</Location>
</IfModule>
<IfModule mod_fastcgi.c>
Alias /mydomain.com.fake /home/user/mydomain.com/mydomain.com.fake
FastCGIExternalServer /home/user/mydomain.com/mydomain.com.fake -host 127.0.0.1:51011
AddType application/x-httpd-fastphp .php
Action application/x-httpd-fastphp /mydomain.com.fake
</IfModule>
<IfModule mod_proxy_fcgi.c>
ProxyPass / fcgi://127.0.0.1:51011/
ProxyPassReverse / fcgi://127.0.0.1:51011/
</IfModule>
Alias /__kloxo "/home/user/kloxoscript/"
Redirect /kloxo "https://cp.mydomain.com:7777"
Redirect /kloxononssl "http://cp.mydomain.com:7778"
Redirect /webmail "http://webmail.mydomain.com"
<Directory "/home/httpd/mydomain.com/kloxoscript/">
AllowOverride All
</Directory>
<IfModule sapi_apache2.c>
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i"
php_admin_value sendmail_from "mydomain.com"
</IfModule>
<IfModule mod_php5.c>
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i"
php_admin_value sendmail_from "mydomain.com"
</IfModule>
ScriptAlias /cgi-bin/ "/home/user/mydomain.com/cgi-bin/"
<Directory "/home/user/mydomain.com/">
AllowOverride All
allow from all
Options +Indexes +FollowSymlinks
</Directory>
<Location />
Options +Includes +FollowSymlinks
</Location>
<Location />
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/home/user:/home/user/kloxoscript:/home/mydomain.com:/home/mydomain.com/httpdocs:/tmp:/usr/share/pear:/var/lib/php/session/:/home/kloxo/httpd/script:"
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir "/home/user:/home/user/kloxoscript:/home/mydomain.com:/home/mydomain.com/httpdocs:/tmp:/usr/share/pear:/var/lib/php/session/:/home/kloxo/httpd/script:"
</IfModule>
</Location>
ScriptAlias /awstats/ "/home/kloxo/httpd/awstats/wwwroot/cgi-bin/"
Alias /awstatscss "/home/kloxo/httpd/awstats/wwwroot/css/"
Alias /awstatsicons "/home/kloxo/httpd/awstats/wwwroot/icon/"
Redirect /stats "http://mydomain.com/awstats/awstats.pl?config=mydomain.com"
Redirect /stats/ "http://mydomain.com/awstats/awstats.pl?config=mydomain.com"
<Location /stats>
Options +Indexes
</Location>
</VirtualHost>
## webmail for 'mydomain.com' handled by ../defaults/webmail.conf
### end content - please not remove this line
The redirection the www should not be / because in the address bar is created //.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^my\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com$1 [R=301,L]
[Updated on: Mon, 19 March 2012 22:08] Report message to a moderator
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96863 is a reply to message #96860] |
Mon, 19 March 2012 22:23   |
|
I don't think will be implementing cache server (like varnish) in my fork. It's enough with implementing template-based and major reverse-proxy.
Different with current kloxo (6.1.x series), with template-based make easy implementing cache server.
By default, in reverse-proxy nginx/lighttpd listen port 80/443 and apache listen port 30080/30443 where nginx/proxy communicate to apache via 30080 (also 30443). All this ports setup on template and we can easy change to other ports.
For example, implementing varnish to nginx-proxy:
1. varnish-nginx-apache --> varnish listen port 80 and request 20080 to nginx ; nginx listen 20080 and request 30080 ; apache listen 30080
2. nginx-varnish-apache --> nginx listen 80 and request 20080; varnish listen 20080 and request 30080 ; apache listen 30080
3. other possibilities
For nginx and apache, enough changing ports on template (defaults.conf.tpl and domains.conf.tpl) and then running 'sh /script/fixweb'.
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96878 is a reply to message #96877] |
Tue, 20 March 2012 02:37   |
|
Hello, I have a big big dilemma, I'm paying for a server and do not know if installing centos 5 or 6, I want to install your fork kloxo, if I install centos 5, I can start working my server installing kloxo 6.1.12, but not I spend hours re-configuration in the reinstallation and reconfiguration of centos 6 when you unset kloxo stable version 6.2 for centos 6, but I can not sit around until you leave the stable version of your fork because I do not Know when you will come out, if installed centos 5 and the fork you finish it in 15 days, I'll have to reinstall all from beginning, and if you take it out tomorrow will give a lot of courage I had not waited one more day, and if I install centos 6 and tomorrow you end the stable version I will be very very happy, but if it takes 15 days to complete the stable version of the fork, I'll be very frustrated not being able to do anything on my server during that time and pay for downtime.
God please give me a sign.
Can I have a sujerencia.
Thank you so much
My English may contain many errors
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96881 is a reply to message #96878] |
Tue, 20 March 2012 03:54   |
|
@rechy2k,
I am not testing for varnish. Only testing for nginx-trafficserver-apache and trafficserver-nginx-apache. No significant between them, but more faster enough compare to nginx-apache.
For centos 6, will be 'release' on the end of April/May 2012 because 2 big challenges (centos 6 and php53) and say it as 6.2.1/6.2.2 where the current is 6.2.0. Another challenge is implementing postfix as qmail alternative for mail server.
I am still think with possibility to revision for version numbering. Maybe the final as 6.5.0 rather than 6.2.0 (with stamp as 'Kloxo plus') because:
1. don't want conflict version with official kloxo
2. fork will be going to far than official kloxo
3. official kloxo MAYBE step-by-step adoption new features from fork
On the feature, the fork will be have 4 steps - alpha, beta, candidate dan final. My target for 6.2.0 is 25 March for beta, 2 April for candidate and 9 April 2012 for final. So next release will be start on 9 April 2012.
I hope I always have energy to do all my works.
My suggest stay on Centos 5 and always update your kloxo.
================
Many thanks to users where to using this fork on their testing/production servers . And also their report on issues.
At this time, more than 20 users to using this fork as said directly.
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96897 is a reply to message #96881] |
Tue, 20 March 2012 10:14   |
Viking  Messages: 245 Registered: July 2010 |
Senior Member |
|
|
I did a fresh install and I have the following errors:
Apache
Firefox can not connect to the server.
Nginx-proxy
The page you are looking for is temporarily unavailable.
Please try again later.
EDIT
The problem only occurs on a new installation by typing the following address:
http:\\ip
After taking a dns tepatles and adding domain working properly.
Rewrite stopped working:
The page is not found.
[Updated on: Tue, 20 March 2012 14:28] Report message to a moderator
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96922 is a reply to message #96914] |
Tue, 20 March 2012 23:36   |
|
I have no time for benchmarking. My target is how to make kloxo more flexible (this is the reason why I introduce template-based config). And then users free to choose that they think the best.
I will not implementing varnish, apache traffic server or other cache servers on my fork. Just enough create wiki/article how to implementing in the feature.
|
|
|
|
|
|
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97072 is a reply to message #97071] |
Mon, 26 March 2012 10:03   |
|
Viking wrote on Mon, 26 March 2012 19:31@mustafaramadhan,
How did the first test installation of 18 March 2012 is in htaccess nginx-proxy to work OK.
Only then something changed and stopped working.
As I know only when select php-fpm_worker/php-fpm_event htaccess not work. No issue for mod_php or suphp.
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97074 is a reply to message #97073] |
Mon, 26 March 2012 10:40   |
|
Viking wrote on Mon, 26 March 2012 21:27mustafaramadhan wrote on Mon, 26 March 2012 16:03Viking wrote on Mon, 26 March 2012 19:31@mustafaramadhan,
How did the first test installation of 18 March 2012 is in htaccess nginx-proxy to work OK.
Only then something changed and stopped working.
As I know only when select php-fpm_worker/php-fpm_event htaccess not work. No issue for mod_php or suphp.
I did four times the test system and it does not work I have htaccess.
I only worked 18 March 2012. Then we stopped and did not work.
Look at my hostspectra.com. This server using the latest revision of my fork (always update for using my fork). Nothing issue with nginx-proxy for suphp_worker/mod_php_ruid2.
In your situation, try switch to other (lighttpd) and then switch back to nginx-proxy. Better for running 'sh /script/fixweb' and then 'service httpd restart, service nginx restart ; service php-fpm restart'.
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97076 is a reply to message #97075] |
Mon, 26 March 2012 11:22   |
|
Viking wrote on Mon, 26 March 2012 11:00mustafaramadhan wrote on Mon, 26 March 2012 16:40Viking wrote on Mon, 26 March 2012 21:27mustafaramadhan wrote on Mon, 26 March 2012 16:03Viking wrote on Mon, 26 March 2012 19:31@mustafaramadhan,
How did the first test installation of 18 March 2012 is in htaccess nginx-proxy to work OK.
Only then something changed and stopped working.
As I know only when select php-fpm_worker/php-fpm_event htaccess not work. No issue for mod_php or suphp.
I did four times the test system and it does not work I have htaccess.
I only worked 18 March 2012. Then we stopped and did not work.
Look at my hostspectra.com. This server using the latest revision of my fork (always update for using my fork). Nothing issue with nginx-proxy for suphp_worker/mod_php_ruid2.
In your situation, try switch to other (lighttpd) and then switch back to nginx-proxy. Better for running 'sh /script/fixweb' and then 'service httpd restart, service nginx restart ; service php-fpm restart'.
Unfortunately it did not help.
Such diversion works:
http://www.mydomain.com/aaaa/bbbb-ccccc/
And this does not:
http://www.mydomain.com/aaaa/bbbb-ccccc/ddd-eee-ff-gggg-hhhh-iii-jjjj.html
It's problem with sufix. I found smilar in joomla.
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97080 is a reply to message #97079] |
Mon, 26 March 2012 11:58   |
|
Purpose for 'location ~* ^.+\.(jpe?g|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|p df|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|avi|mp3|html?)$ {' is nginx taken 'static files' directly and request to apache for php process.
It's ok if I removing 'html' from 'location' above but not for others.
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97082 is a reply to message #97080] |
Mon, 26 March 2012 12:11   |
|
mustafaramadhan wrote on Mon, 26 March 2012 11:58Purpose for 'location ~* ^.+\.(jpe?g|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|p df|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|avi|mp3|html?)$ {' is nginx taken 'static files' directly and request to apache for php process.
It's ok if I removing 'html' from 'location' above but not for others.
Joomla working now
|
|
|
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97108 is a reply to message #97106] |
Tue, 27 March 2012 04:26   |
|
cstools wrote on Tue, 27 March 2012 14:00Hello 
There is no way to disable the nginx for a specific domain?
Thanks very much for responding 
What the reason you want this options?.
I have a plan someday kloxo can handling multi-webservers where apache, lighttpd, nginx, lighttpd-proxy and nginx-proxy run together. User can choose webserver that they want. Say it, user1 using lighttpd, user2 using nginx-proxy.
But, it's maybe release next year (2013 - ?).
[Updated on: Tue, 27 March 2012 05:53] Report message to a moderator
|
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97119 is a reply to message #97117] |
Tue, 27 March 2012 11:30   |
Viking  Messages: 245 Registered: July 2010 |
Senior Member |
|
|
mustafaramadhan wrote on Tue, 27 March 2012 17:23@Viking,
If you mean after 'disable client' page just blank. It's must be 'disable page' appear and now fixed this issue.
It is not allowed index.php, index.html works.
Once I was already a problem in kloxo.
EDIT
I did a test on a production server, and the difference in memory consumption.
Kloxo 6.1.2 ~ 180MB
Kloxo 6.2.0 ~ 280MB
This difference is 100MB is consumed by nginx-proxy?
[Updated on: Tue, 27 March 2012 11:47] Report message to a moderator
|
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97137 is a reply to message #97119] |
Tue, 27 March 2012 23:07   |
|
Viking wrote on Tue, 27 March 2012 22:30mustafaramadhan wrote on Tue, 27 March 2012 17:23@Viking,
If you mean after 'disable client' page just blank. It's must be 'disable page' appear and now fixed this issue.
It is not allowed index.php, index.html works.
Once I was already a problem in kloxo.
EDIT
I did a test on a production server, and the difference in memory consumption.
Kloxo 6.1.2 ~ 180MB
Kloxo 6.2.0 ~ 280MB
This difference is 100MB is consumed by nginx-proxy?
When 'disable client', rootdir change to /home/kloxo/httpd/disable. It's the same with access to disable.domain.com (need adding 'disable' on 'server aliases').
Inside this dir, you see index.php and index.html.
About memory, 6.2.0 always running php-fpm service and why need more memory.
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97154 is a reply to message #97148] |
Wed, 28 March 2012 10:12   |
|
Viking wrote on Wed, 28 March 2012 19:06@mustafaramadhan,
And somehow, you can optimize the memory?
It seems to me that the processes are created and not end there. And thus the memory usage increases while keeping the old processes.
It's mod_php variant issue whatever we will set memory optimize. At this apache version (2.2.x), no memory issue for suphp variant.
Sadly, php-fpm_worker/php-fpm_event still have .htaccess issue.
So, better using suphp_worker/suphp_event at this moment.
|
|
|
|
| Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97163 is a reply to message #97157] |
Wed, 28 March 2012 17:05   |
|
Hi mustafaramadhan,
I have a problem with maping ip to domain/subdomain...
I tried updating the fork so i have latest version but still can make it work..
I map the ip with no erros in a domain/subdomain but the kloxo page keeps appearing.. ("If you are seeing this page, it means that web has not been configured for this domain on this server.")
Tried with apache only/apache+nginx proxy &(suphp worker/mod php / mod php ruid)but still no luck
Tried adding manually the ip & domain in etc/hosts - Still no luck
My subdomains pings to my ip so its ok (* i want to setup a subdomain with VPS ip so i can install ssl certificate)
Can you please verify if its a problem on the Fork or only in my VPS ?
Thank you in advance
Centos 5.7 x86
Kloxo 6.2.0
Solus Vm management panel.
|
|
|
|