LxCenter HyperVM & Kloxo Support

Forum



Members   Search      Help    Register    Login    Home
Home » Development Forums » Kloxo Development » [FORK] Nginx, Nginx-proxy and Lighttpd-proxy
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96860 is a reply to message #95665] Mon, 19 March 2012 19:51 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
mustafaramadhan wrote on Thu, 01 March 2012 18:12
Related 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 //.

http://mydomain.com//


    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 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

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'.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96877 is a reply to message #96863] Tue, 20 March 2012 01:25 Go to previous messageGo to next message
rechy2k is currently offline rechy2k  Mexico
Messages: 8
Registered: March 2012
Member
You have performed your benchmark, which has more performance?
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96878 is a reply to message #96877] Tue, 20 March 2012 02:37 Go to previous messageGo to next message
rechy2k is currently offline rechy2k  Mexico
Messages: 8
Registered: March 2012
Member
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 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

@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.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96897 is a reply to message #96881] Tue, 20 March 2012 10:14 Go to previous messageGo to next message
Viking  Poland
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 #96914 is a reply to message #96863] Tue, 20 March 2012 17:06 Go to previous messageGo to next message
Spacedust is currently offline Spacedust  Poland
Messages: 1233
Registered: October 2007
Location: Poland
Senior Master
mustafaramadhan wrote on Tue, 20 March 2012 03: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'.


Varnish itself is fast enough when using DDR3 1333 MHz RAM as a cache file, so nginx-proxy is not needed, but if you make benchmarks I might be wrong.
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #96922 is a reply to message #96914] Tue, 20 March 2012 23:36 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

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.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97052 is a reply to message #95665] Sun, 25 March 2012 07:39 Go to previous messageGo to next message
cstools is currently offline cstools
Messages: 4
Registered: March 2012
Location: Viana do Castelo - Portug...
Member
Hello Wink

When I switch to nginx
Give me 502 bad gateway sites

I have done the command "sh /script/fixweb" and reboot, but still the same.

Help me please :S

[Updated on: Sun, 25 March 2012 07:41]

Report message to a moderator

Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97054 is a reply to message #97052] Sun, 25 March 2012 09:59 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

cstools wrote on Sun, 25 March 2012 18:39
Hello Wink

When I switch to nginx
Give me 502 bad gateway sites

I have done the command "sh /script/fixweb" and reboot, but still the same.

Help me please :S

Open '/home/nginx/conf/globals/proxy.conf' and change:

        proxy_buffers 32 4k;


to:
   #     proxy_buffers 32 4k;
        proxy_buffers 8 16k;
        proxy_buffer_size 32k;


and better read http://wiki.nginx.org/HttpProxyModule for nginx-proxy


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97056 is a reply to message #97054] Sun, 25 March 2012 11:10 Go to previous messageGo to next message
cstools is currently offline cstools
Messages: 4
Registered: March 2012
Location: Viana do Castelo - Portug...
Member
equal :S
My idea was this - www.bragil.net/linux-unix/nginx-apache-php5-apc-linux-memcac hed-performance-parte-2/

Only Ngnix that gives me 502 bad gateway :S

Thank for responding and help mustafaramadhan Wink

[Updated on: Sun, 25 March 2012 11:11]

Report message to a moderator

Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97058 is a reply to message #97056] Sun, 25 March 2012 12:30 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

@cstools,

How about when without memcached?. Still the same?


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97063 is a reply to message #97058] Sun, 25 March 2012 16:20 Go to previous messageGo to next message
cstools is currently offline cstools
Messages: 4
Registered: March 2012
Location: Viana do Castelo - Portug...
Member
I managed to solve.

Another problem:
Since I switched to nginx does not read pages. Cgi

example:
http://upload.cstools.net redirect for link down, by htaccess
http://upload.cstools.net/cgi-bin/index.cgi
"Page not found" but it's there: S
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97070 is a reply to message #97063] Mon, 26 March 2012 02:26 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

@cstools,

Can you explain how to resolve your issue?.

Until now, cgi on 'pure' nginx not work. Still dilemma, using fastcgi handling or others. I hope at 'final' release will be ready.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Mon, 26 March 2012 06:59]

Report message to a moderator

Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97071 is a reply to message #97070] Mon, 26 March 2012 08:31 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
@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.
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97072 is a reply to message #97071] Mon, 26 March 2012 10:03 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

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.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97073 is a reply to message #97072] Mon, 26 March 2012 10:27 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
mustafaramadhan wrote on Mon, 26 March 2012 16: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.

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.
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97074 is a reply to message #97073] Mon, 26 March 2012 10:40 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Viking wrote on Mon, 26 March 2012 21:27
mustafaramadhan wrote on Mon, 26 March 2012 16: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.

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'.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97075 is a reply to message #97074] Mon, 26 March 2012 11:00 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
mustafaramadhan wrote on Mon, 26 March 2012 16:40
Viking wrote on Mon, 26 March 2012 21:27
mustafaramadhan wrote on Mon, 26 March 2012 16: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.

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
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97076 is a reply to message #97075] Mon, 26 March 2012 11:22 Go to previous messageGo to next message
marid is currently offline marid  Poland
Messages: 69
Registered: November 2011
Valuable Member
Viking wrote on Mon, 26 March 2012 11:00
mustafaramadhan wrote on Mon, 26 March 2012 16:40
Viking wrote on Mon, 26 March 2012 21:27
mustafaramadhan wrote on Mon, 26 March 2012 16: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.

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 #97079 is a reply to message #97076] Mon, 26 March 2012 11:50 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
@mustafaramadhan,

The problem is:
/home/nginx/conf/globals/proxy.conf

That does not work:
    error_page 404 /404.html;

    location = /404.html {
        root '/usr/share/nginx/html';
    }

    error_page 500 502 503 504 /50x.html;

    location = /50x.html {
        root '/usr/share/nginx/html';
    }

    location / {

        proxy_pass http://127.0.0.1:30080/;

        proxy_redirect off;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
   #     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-For $remote_addr;
   
        proxy_pass_header Set-Cookie;

        proxy_headers_hash_max_size 512;

        proxy_connect_timeout 90;
        proxy_send_timeout 90;
        proxy_read_timeout 90;
   #     proxy_buffers 32 4k;
        proxy_buffers 8 16k;
        proxy_buffer_size 32k;

   #     proxy_cache cache;
        proxy_cache_valid 10m;
        proxy_cache_valid 404 1m;

        proxy_cache_key "$scheme$host$request_uri";

        proxy_cache_use_stale error timeout invalid_header
                              http_500 http_502 http_504 http_404;

        client_max_body_size 10m;
        client_body_buffer_size 128k;

        open_file_cache max=1024 inactive=600s;
        open_file_cache_valid 2000s;
        open_file_cache_min_uses 1;
        open_file_cache_errors on;

        limit_conn addr 25;
    }

    location ~* ^.+\.(jpe?g|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|avi|mp3|html?)$ {
        expires 2d;
        access_log off;
        root $rootdir;
    }

    location ~ /\.ht {
        deny all;
    }

    if (-f $request_filename) {
        break;
    }
 
    if (-d $request_filename) {
        break;
    }


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?)$ {
expires 2d;
access_log off;
root $rootdir;
}


That works and is OK:
    error_page 404 /404.html;

    location = /404.html {
        root '/usr/share/nginx/html';
    }

    error_page 500 502 503 504 /50x.html;

    location = /50x.html {
        root '/usr/share/nginx/html';
    }

    location / {

        proxy_pass http://127.0.0.1:30080/;

        proxy_redirect off;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
   #     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-For $remote_addr;
   
        proxy_pass_header Set-Cookie;

        proxy_headers_hash_max_size 512;

        proxy_connect_timeout 90;
        proxy_send_timeout 90;
        proxy_read_timeout 90;
   #     proxy_buffers 32 4k;
        proxy_buffers 8 16k;
        proxy_buffer_size 32k;

   #     proxy_cache cache;
        proxy_cache_valid 10m;
        proxy_cache_valid 404 1m;

        proxy_cache_key "$scheme$host$request_uri";

        proxy_cache_use_stale error timeout invalid_header
                              http_500 http_502 http_504 http_404;

        client_max_body_size 10m;
        client_body_buffer_size 128k;

        open_file_cache max=1024 inactive=600s;
        open_file_cache_valid 2000s;
        open_file_cache_min_uses 1;
        open_file_cache_errors on;

        limit_conn addr 25;
    }

#    location ~* ^.+\.(jpe?g|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|avi|mp3|html?)$ {
#        expires 2d;
#        access_log off;
#        root $rootdir;
#    }

    location ~ /\.ht {
        deny all;
    }

    if (-f $request_filename) {
        break;
    }
 
    if (-d $request_filename) {
        break;
    }


# 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?)$ {
# expires 2d;
# access_log off;
# root $rootdir;
# }
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97080 is a reply to message #97079] Mon, 26 March 2012 11:58 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

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.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97081 is a reply to message #97080] Mon, 26 March 2012 12:06 Go to previous messageGo to next message
shazar is currently offline shazar  United States
Messages: 1856
Registered: May 2011
Grandmaster
LxCenter Core Team Member
LxCenter Representative
Instead of detecting every individual file like that, why don't you detect that it is not php?

https://www.mercuryvps.com
HyperVM Xen VPS hosting
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97082 is a reply to message #97080] Mon, 26 March 2012 12:11 Go to previous messageGo to next message
marid is currently offline marid  Poland
Messages: 69
Registered: November 2011
Valuable Member
mustafaramadhan wrote on 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.

Joomla working now
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97083 is a reply to message #97082] Mon, 26 March 2012 12:19 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
@mustafaramadhan,

Yes you are right. I looked for the cause of the error quickly without thorough analysis.

EDIT
The new error.
Force Redirect Domain.com It Www.domain.com
duplicate location "/" in /home/nginx/conf/globals/proxy.conf:13

[Updated on: Mon, 26 March 2012 13:01]

Report message to a moderator

Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97093 is a reply to message #97083] Mon, 26 March 2012 14:57 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

@Viking,

Thanks again.

Fixed with change to 'location /' to 'if ($host !='. Nginx not permit multiple declare for 'location /'


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97097 is a reply to message #97093] Mon, 26 March 2012 16:19 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
Now it works OK.
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97106 is a reply to message #97097] Tue, 27 March 2012 03:00 Go to previous messageGo to next message
cstools is currently offline cstools
Messages: 4
Registered: March 2012
Location: Viana do Castelo - Portug...
Member
Hello Smile

There is no way to disable the nginx for a specific domain?

Thanks very much for responding Wink
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97108 is a reply to message #97106] Tue, 27 March 2012 04:26 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

cstools wrote on Tue, 27 March 2012 14:00
Hello Smile

There is no way to disable the nginx for a specific domain?

Thanks very much for responding Wink


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 - ?).


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png

[Updated on: Tue, 27 March 2012 05:53]

Report message to a moderator

Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97109 is a reply to message #97108] Tue, 27 March 2012 06:55 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
Disabled page displays a white page.
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97117 is a reply to message #97109] Tue, 27 March 2012 11:23 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

@Viking,

If you mean after 'disable client' page just blank. It's must be 'disable page' appear and now fixed this issue.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97119 is a reply to message #97117] Tue, 27 March 2012 11:30 Go to previous messageGo to next message
Viking  Poland
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 #97128 is a reply to message #97119] Tue, 27 March 2012 14:18 Go to previous messageGo to next message
whitepanda is currently offline whitepanda
Messages: 2
Registered: March 2012
Location: Indonesia
Member
ip 127.0.0.1 is localhost right?

Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97131 is a reply to message #97128] Tue, 27 March 2012 15:45 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
whitepanda wrote on Tue, 27 March 2012 20:18
ip 127.0.0.1 is localhost right?

Yes
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97137 is a reply to message #97119] Tue, 27 March 2012 23:07 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Viking wrote on Tue, 27 March 2012 22:30
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?

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.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97148 is a reply to message #97137] Wed, 28 March 2012 08:06 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
@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.
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97154 is a reply to message #97148] Wed, 28 March 2012 10:12 Go to previous messageGo to next message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

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.


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97157 is a reply to message #97154] Wed, 28 March 2012 10:37 Go to previous messageGo to next message
Viking  Poland
Messages: 245
Registered: July 2010
Senior Member
mustafaramadhan wrote on Wed, 28 March 2012 16:12

So, better using suphp_worker/suphp_event at this moment.

In conjunction with the nginx-proxy?
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97163 is a reply to message #97157] Wed, 28 March 2012 17:05 Go to previous messageGo to next message
djscooby is currently offline djscooby  Greece
Messages: 90
Registered: August 2011
Valuable Member
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.
Re: [FORK] Nginx, Nginx-proxy and Lighttpd-proxy [message #97167 is a reply to message #97157] Wed, 28 March 2012 22:49 Go to previous messageGo to previous message
mustafaramadhan is currently offline mustafaramadhan  Indonesia
Messages: 5676
Registered: December 2010
Location: Yogyakarta
Super Grandmaster
Forum Moderator

Viking wrote on Wed, 28 March 2012 21:37
mustafaramadhan wrote on Wed, 28 March 2012 16:12

So, better using suphp_worker/suphp_event at this moment.

In conjunction with the nginx-proxy?

Yes


http://download.lxcenter.org/kdev.png
..:: MRatWork ::..
Server/Web-integrator - perfect not always more useful

--- Need KVM/OpenVZ VPS? - click here (Kloxo-MR READY!) ---

For bug/feature/security - Member rank status

http://download.lxcenter.org/hdev.png
Previous Topic:Password Protected Directory & Awstats Problems
Next Topic:Apache driver testers needed
Goto Forum:
  


Current Time: Thu May 23 14:31:55 EDT 2013

Total time taken to generate the page: 0.02023 seconds
.:: Contact :: Home :: Privacy ::.

Click here to lend your support to: LxCenter and make a donation at www.pledgie.com !

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software