HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   wheezy nginx php-fpm 3.0.5 upgrade (http://www.howtoforge.com/forums/showthread.php?t=61331)

maumar 7th April 2013 16:48

wheezy nginx php-fpm 3.0.5 upgrade
 
Hello
i have a wheezy with nginx and php-fpm, fastcgi etc etc.
One week ago I upgraded to 3.0.5.2 and sites were working fine.
Now I have changed something like quota for 2 sites and that 2 sites stop working.

Question 1:
What I note is that on combo box of php configuration (on panel) there is only php-fpm (not fast-cgi anymore), is it ok? I can't select fast-cgi anymore

Question 2.
on vhost nginx files (of modified sites) there is still configured php with cgi,
there is no php-fpm configuration; is that correct?

i am very confused

i have tried to reconfigure manually adding the piece of configuration missing but still it does not work.

this is the piece of vhost configuration that (imho) should not be there

Code:


        location /cgi-bin/ {
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            root /var/www/clients/client34/web1010;
            gzip off;
            fastcgi_pass  unix:/var/run/fcgiwrap.socket;
            fastcgi_index index.cgi;
            fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        }



this is the error legged:

Code:


2013/04/07 13:06:42 [error] 10075#0: *11 access forbidden by rule, client: 87.16.197.63, server: fashiontattoo.it, request: "GET / HTTP/1.1", host: "www.fashiontattoo.it"

Then, we have tried to create a new site on that server. This way, I couldcheck how it configures sietes with php-fpm.

Sadly, very sadly, there is no php-fpm on vhost file of newly created site. Look:

Code:

grep fpm 46ikymhds.it.vhost
root@web4: /etc/nginx/sites-available #

I have ither servers with debian wheezy and nginx, all coming from 3.0.4.6 and upgraded to 3.0.5.2.
I am very worried, I suspect, I am almost sure that all of them are working only b/c I have not touch anything.

I am very very worried. What can i do, now?

maumar 7th April 2013 18:43

I have solved this way:

cd into /etc/php5/fpm/pool.d/

than cat file relative to hosting, my user is web1010 so cat web1010.conf
Code:

grep listen /etc/php5/fpm/pool.d/web1010.conf
listen = 127.0.0.1:10019
listen.allowed_clients = 127.0.0.1

ok, then php-fpm is listening on port 10019 for web1010.
Then I add this piece of conf that i found using grep

Code:

        location ~ \.php$ {
            try_files $uri =404;
            include /etc/nginx/fastcgi_params;
            fastcgi_pass 127.0.0.1:10019;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_script_name;
        }

now I know what to do every time I change something, I the meantime maybe the issue will be analyzed, should I file a bug?

maumar 7th April 2013 19:04

must be commented this one too:


Code:

#        location ~ \.php$ {
#            deny all;
#        }

commentd or cleared

falko 8th April 2013 19:19

Quote:

Originally Posted by maumar (Post 295490)
Question 1:
What I note is that on combo box of php configuration (on panel) there is only php-fpm (not fast-cgi anymore), is it ok? I can't select fast-cgi anymore

In ISPConfig 3.0.4, it was named FastCGI, in 3.0.5 it is named PHP-FPM, so that's ok.

Quote:

Originally Posted by maumar (Post 295490)
Question 2.
on vhost nginx files (of modified sites) there is still configured php with cgi,
there is no php-fpm configuration; is that correct?

CGI refers to Perl scripts and has nothing to do with PHP.

maumar 12th April 2013 21:52

Hello Falko
thnx for answer :)
Now, I have created a new web site on that server (debian7 + nginx +php-fpm).
I have selected php-fpm
In vhost file there No relatied to php and php-fpm

Code:


server {
        listen *:80;


        server_name 46ikymhds.it www.46ikymhds.it;

        root  /var/www/46ikymhds.it/web;



        location / {
                try_files $uri $uri/ /index.php?$args;
        }

      # Add trailing slash to */wp-admin requests.
      rewrite /wp-admin$ $scheme://$host$uri/ permanent;

        location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
                expires max;
                log_not_found off;
        }


      include /var/www/46ikymhds.it/web/nginx.conf;

        location ~ /nginx.conf {
                        deny all;
                        access_log off;
                        log_not_found off;
        }




        index index.html index.htm index.php index.cgi index.pl index.xhtml;



        error_page 400 /error/400.html;
        error_page 401 /error/401.html;
        error_page 403 /error/403.html;
        error_page 404 /error/404.html;
        error_page 405 /error/405.html;
        error_page 500 /error/500.html;
        error_page 502 /error/502.html;
        error_page 503 /error/503.html;
        recursive_error_pages on;
        location = /error/400.html {
            internal;
        }
        location = /error/401.html {
            internal;
        }
        location = /error/403.html {
            internal;
        }
        location = /error/404.html {
            internal;
        }
        location = /error/405.html {
            internal;
        }
        location = /error/500.html {
            internal;
        }
        location = /error/502.html {
            internal;
        }
        location = /error/503.html {
            internal;
        }

        error_log /var/log/ispconfig/httpd/46ikymhds.it/error.log;
        access_log /var/log/ispconfig/httpd/46ikymhds.it/access.log combined;

        ## Disable .htaccess and other hidden files
        location ~ /\. {
            deny all;
            access_log off;
            log_not_found off;
        }

        location = /favicon.ico {
            log_not_found off;
            access_log off;
        }

        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }

        location /stats {
            index index.html index.php;
            auth_basic "Members Only";
            auth_basic_user_file /var/www/clients/client21/web1506/web/stats/.htpasswd_stats;
        }

        location ^~ /awstats-icon {
            alias /usr/share/awstats/icon;
        }

        location ~ \.php$ {
            deny all;
        }



}

it is like we haven't enabled php, as you can se by this piece:

Code:


        location ~ \.php$ {
            deny all;
        }



do u think that upgrade has corrupted configuration server?

many thnx

maumar 29th April 2013 17:17

hello
I am still the only one to have this kind of issue
with nginx and debian wheezy?

At the moment I am unable to create new hosting w/out then apply changes to newly created vhost file.

Any feedback by some other user that has my configuration?


All times are GMT +2. The time now is 03:35.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.