#1  
Old 29th January 2013, 11:26
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: Mnchen
Posts: 364
Thanks: 39
Thanked 89 Times in 68 Posts
Default [Solved] nginx apps vhost issue

Hello,

I'm sorry but I can't find what's wrong here. In my production server I can't access phpmyadmin anymore.

Tried with domain.tld:8081/phpmyadmin and other.com/phpmyadmin

I get error 500.

Ubuntu 12.04 LTS

Info:

Code:
lrwxrwxrwx 1 root root   37 Apr 27  2012 000-apps.vhost -> /etc/nginx/sites-available/apps.vhost
Code:
-rw-r--r-- 1 root root 9867 Jan 29 09:40 /etc/nginx/sites-available/apps.vhost
Code:
server {
        listen 8081;

        server_name _;

        root   /var/www/apps;

        client_max_body_size 20M;

        location / {
               index index.php index.html;
        }

        # serve static files directly
        location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt)$ {
               access_log        off;
        }

        location ~ \.php$ {
               try_files $uri =404;
               fastcgi_param   QUERY_STRING            $query_string;
               fastcgi_param   REQUEST_METHOD          $request_method;
               fastcgi_param   CONTENT_TYPE            $content_type;
               fastcgi_param   CONTENT_LENGTH          $content_length;

               fastcgi_param   SCRIPT_FILENAME         $request_filename;
               fastcgi_param   SCRIPT_NAME             $fastcgi_script_name;
               fastcgi_param   REQUEST_URI             $request_uri;
               fastcgi_param   DOCUMENT_URI            $document_uri;
               fastcgi_param   DOCUMENT_ROOT           $document_root;
               fastcgi_param   SERVER_PROTOCOL         $server_protocol;

               fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
               fastcgi_param   SERVER_SOFTWARE         nginx/$nginx_version;

               fastcgi_param   REMOTE_ADDR             $remote_addr;
               fastcgi_param   REMOTE_PORT             $remote_port;
               fastcgi_param   SERVER_ADDR             $server_addr;
               fastcgi_param   SERVER_PORT             $server_port;
               fastcgi_param   SERVER_NAME             $server_name;

               fastcgi_param   HTTPS                   $https;

               # PHP only, required if PHP was built with --enable-force-cgi-redirect
               fastcgi_param   REDIRECT_STATUS         200;
               fastcgi_pass unix:/var/lib/php5-fpm/apps.sock;
               fastcgi_index index.php;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_script_name;
               fastcgi_buffer_size 128k;
               fastcgi_buffers 256 4k;
               fastcgi_busy_buffers_size 256k;
               fastcgi_temp_file_write_size 256k;
        }

        location ~ /\. {
               deny  all;
        }

        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_param   QUERY_STRING            $query_string;
                       fastcgi_param   REQUEST_METHOD          $request_method;
                       fastcgi_param   CONTENT_TYPE            $content_type;
                       fastcgi_param   CONTENT_LENGTH          $content_length;

                       fastcgi_param   SCRIPT_FILENAME         $request_filename;
                       fastcgi_param   SCRIPT_NAME             $fastcgi_script_name;
                       fastcgi_param   REQUEST_URI             $request_uri;
                       fastcgi_param   DOCUMENT_URI            $document_uri;
                       fastcgi_param   DOCUMENT_ROOT           $document_root;
                       fastcgi_param   SERVER_PROTOCOL         $server_protocol;

                       fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
                       fastcgi_param   SERVER_SOFTWARE         nginx/$nginx_version;

                       fastcgi_param   REMOTE_ADDR             $remote_addr;
                       fastcgi_param   REMOTE_PORT             $remote_port;
                       fastcgi_param   SERVER_ADDR             $server_addr;
                       fastcgi_param   SERVER_PORT             $server_port;
                       fastcgi_param   SERVER_NAME             $server_name;

                       fastcgi_param   HTTPS                   $https;

                       # PHP only, required if PHP was built with --enable-force-cgi-redirect
                       fastcgi_param   REDIRECT_STATUS         200;
                       # To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used
                       fastcgi_pass 127.0.0.1:9000;
                       #fastcgi_pass unix:/var/run/php5-fpm.sock;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
                       fastcgi_read_timeout 240;
                       
                       }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /phpMyAdmin {
               rewrite ^/* /phpmyadmin last;
        }
		
        location /squirrelmail {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/squirrelmail/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_param   QUERY_STRING            $query_string;
                       fastcgi_param   REQUEST_METHOD          $request_method;
                       fastcgi_param   CONTENT_TYPE            $content_type;
                       fastcgi_param   CONTENT_LENGTH          $content_length;

                       fastcgi_param   SCRIPT_FILENAME         $request_filename;
                       fastcgi_param   SCRIPT_NAME             $fastcgi_script_name;
                       fastcgi_param   REQUEST_URI             $request_uri;
                       fastcgi_param   DOCUMENT_URI            $document_uri;
                       fastcgi_param   DOCUMENT_ROOT           $document_root;
                       fastcgi_param   SERVER_PROTOCOL         $server_protocol;

                       fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
                       fastcgi_param   SERVER_SOFTWARE         nginx/$nginx_version;

                       fastcgi_param   REMOTE_ADDR             $remote_addr;
                       fastcgi_param   REMOTE_PORT             $remote_port;
                       fastcgi_param   SERVER_ADDR             $server_addr;
                       fastcgi_param   SERVER_PORT             $server_port;
                       fastcgi_param   SERVER_NAME             $server_name;

                       fastcgi_param   HTTPS                   $https;

                       # PHP only, required if PHP was built with --enable-force-cgi-redirect
                       fastcgi_param   REDIRECT_STATUS         200;
                       # To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used
                       fastcgi_pass 127.0.0.1:9000;
                       #fastcgi_pass unix:/var/run/php5-fpm.sock;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                       fastcgi_buffer_size 128k;
                       fastcgi_buffers 256 4k;
                       fastcgi_busy_buffers_size 256k;
                       fastcgi_temp_file_write_size 256k;
               }
               location ~* ^/squirrelmail/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        location /webmail {
               rewrite ^/* /squirrelmail last;
        }

        location /cgi-bin/mailman {
               root /usr/lib/;
               fastcgi_split_path_info (^/cgi-bin/mailman/[^/]*)(.*)$;
               fastcgi_param   QUERY_STRING            $query_string;
               fastcgi_param   REQUEST_METHOD          $request_method;
               fastcgi_param   CONTENT_TYPE            $content_type;
               fastcgi_param   CONTENT_LENGTH          $content_length;

               fastcgi_param   SCRIPT_FILENAME         $request_filename;
               fastcgi_param   SCRIPT_NAME             $fastcgi_script_name;
               fastcgi_param   REQUEST_URI             $request_uri;
               fastcgi_param   DOCUMENT_URI            $document_uri;
               fastcgi_param   DOCUMENT_ROOT           $document_root;
               fastcgi_param   SERVER_PROTOCOL         $server_protocol;

               fastcgi_param   GATEWAY_INTERFACE       CGI/1.1;
               fastcgi_param   SERVER_SOFTWARE         nginx/$nginx_version;

               fastcgi_param   REMOTE_ADDR             $remote_addr;
               fastcgi_param   REMOTE_PORT             $remote_port;
               fastcgi_param   SERVER_ADDR             $server_addr;
               fastcgi_param   SERVER_PORT             $server_port;
               fastcgi_param   SERVER_NAME             $server_name;

               fastcgi_param   HTTPS                   $https;

               # PHP only, required if PHP was built with --enable-force-cgi-redirect
               fastcgi_param   REDIRECT_STATUS         200;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_path_info;
               fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
               fastcgi_intercept_errors on;
               fastcgi_pass unix:/var/run/fcgiwrap.socket;
        }

        location /images/mailman {
               alias /usr/share/images/mailman;
        }

        location /pipermail {
               alias /var/lib/mailman/archives/public;
               autoindex on;
        }
}
Code:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp        0      0 127.0.0.1:9060          0.0.0.0:*               LISTEN      0          12227       2137/php-fpm.conf)
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      0          12230       2137/php-fpm.conf)
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      105        9454        879/mysqld      
tcp        0      0 127.0.0.1:9071          0.0.0.0:*               LISTEN      0          12233       2137/php-fpm.conf)
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      0          17971       3640/nginx.conf 
tcp        0      0 xxxxxxxxx:8081      0.0.0.0:*               LISTEN      0          17975       3640/nginx.conf 
tcp        0      0 127.0.0.1:9075          0.0.0.0:*               LISTEN      0          12234       2137/php-fpm.conf)
tcp        0      0 127.0.0.1:9012          0.0.0.0:*               LISTEN      0          12228       2137/php-fpm.conf)
tcp        0      0 127.0.0.1:9077          0.0.0.0:*               LISTEN      0          12229       2137/php-fpm.conf)
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      0          11089       1865/pure-ftpd (SER
tcp        0      0 xxxxxxxxx:53        0.0.0.0:*               LISTEN      107        8902        980/named       
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      107        8900        980/named       
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          8472        746/sshd        
tcp        0      0 127.0.0.1:9049          0.0.0.0:*               LISTEN      0          12232       2137/php-fpm.conf)
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      0          10955       1842/master     
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      107        8905        980/named       
tcp        0      0 xxxxxxxxxxx:443       0.0.0.0:*               LISTEN      0          17973       3640/nginx.conf 
tcp        0      0 127.0.0.1:9055          0.0.0.0:*               LISTEN      0          12226       2137/php-fpm.conf)
tcp        0      0 xxxxxxxxxxxx:48938     xxxxxxxxxxxx:3306     TIME_WAIT   0          0           -               
tcp        0      0 xxxxxxxxxxx:37631     xxxxxxxxxxxx:8081      ESTABLISHED 0          24190       2895/sshd: root 
tcp        0      0 xxxxxxxxxxx:8081      xxxxxxxxxx:37631     ESTABLISHED 33         24191       3746/nginx: worker 
tcp        0      0 xxxxxxxxxxx:43643     xxxxxxxxxxxxxx:993      ESTABLISHED 0          13687       2895/sshd: root 
tcp        0      0 xxxxxxxxxx:59782     xxxxxxxxxxxxxx:80          TIME_WAIT   0          0           -               
tcp        0      0 127.0.0.1:80            127.0.0.1:46422         TIME_WAIT   0          0           -               
tcp        0      0 xxxxxxxxxxxx:59784     xxxxxxxxxxxxxx:80          TIME_WAIT   0          0           -               
tcp        0      0 127.0.0.1:21            127.0.0.1:60457         TIME_WAIT   0          0           -               
tcp        0      0 xxxxxxxxxxxx:58472     xxxxxxxxxxxxxxx:143      ESTABLISHED 0          13728       2895/sshd: root 
tcp        0      0 xxxxxxxxxxx:42037     xxxxxxxxxxxxxxx:80          TIME_WAIT   0          0           -               
tcp        0      0 127.0.0.1:9000          127.0.0.1:57967         TIME_WAIT   0          0           -               
tcp        0      0 xxxxxxxxxxx:22        xxxxxxxxxxxxx:52852      ESTABLISHED 0          13213       2895/sshd: root 
tcp        0   5808 xxxxxxxxxx:22        xxxxxxxxxxxx:52832      ESTABLISHED 0          7818        642/2           
tcp        0      0 xxxxxxxxxx:42035    xxxxxxxxxxxx:80          TIME_WAIT   0          0           -               
tcp        0      0 xxxxxxxxxx:58974     xxxxxxxxxx:143      ESTABLISHED 0          20878       2895/sshd: root 
tcp        0      0 xxxxxxxxxx:59786     xxxxxxxxxxxx:80          TIME_WAIT   0          0           -               
tcp6       0      0 aaaaaaaaaaaaa::2:80 :::*                    LISTEN      0          17972       3640/nginx.conf 
tcp6       0      0 :::21                   :::*                    LISTEN      0          11090       1865/pure-ftpd (SER
tcp6       0      0 :::53                   :::*                    LISTEN      107        8895        980/named       
tcp6       0      0 :::22                   :::*                    LISTEN      0          8474        746/sshd        
tcp6       0      0 ::1:25                  :::*                    LISTEN      0          10956       1842/master     
tcp6       0      0 ::1:953                 :::*                    LISTEN      107        8906        980/named       
tcp6       0      0 aaaaaaaaaaaaaaaaaaa:::443 :::*                    LISTEN      0          17974       3640/nginx.conf
ls -la /etc/phpmyadmin/
Code:
total 56
drwxr-xr-x   2 root root      4096 Jan 29 09:28 .
drwxr-xr-x 116 root root     12288 Jan 29 10:03 ..
-rw-r--r--   1 root root      1057 Feb 14  2012 apache.conf
-rw-r-----   1 root www-data   553 Jan 29 09:28 config-db.php
-rw-r--r--   1 root root       168 Feb 14  2012 config.footer.inc.php
-rw-r--r--   1 root root       168 Feb 14  2012 config.header.inc.php
-rw-r--r--   1 root root      4388 Feb 14  2012 config.inc.php
-rw-r-----   1 root www-data     8 Jan 29 09:28 htpasswd.setup
-rw-r--r--   1 root root       570 Feb 14  2012 lighttpd.conf
-rw-r--r--   1 root root       198 Feb 14  2012 phpmyadmin.desktop
-rw-r--r--   1 root root       295 Feb 14  2012 phpmyadmin.service
ls -la /var/www
Code:
drwxr-xr-x  2 ispapps ispapps 4096 Apr 11  2012 apps
access.log
Code:
xxxxxxxxxxx - - [29/Jan/2013:10:06:59 +0100] "GET /phpmyadmin/ HTTP/1.1" 500 5 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0"
error.log
full, but nothing about the 500 error.

Any idea please?

Last edited by pititis; 30th January 2013 at 11:45.
Reply With Quote
Sponsored Links
  #2  
Old 30th January 2013, 11:44
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: Mnchen
Posts: 364
Thanks: 39
Thanked 89 Times in 68 Posts
Default

Well, I found the problem.

Problem was the disable_funtions in php.ini

BUT nginx doesn't write nothing in the error.log.

I'm trying to figure out why a 500 code in nginx isn't writed. Default log level is error. After this issue I changed the error log level to debug but ... nothing!

However I don't know if this issue is nginx or fpm related

Cheers

Last edited by pititis; 30th January 2013 at 12:00.
Reply With Quote
  #3  
Old 30th January 2013, 12:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,651 Times in 4,461 Posts
Default

Quote:
After this issue I changed the error log level to debug but ... nothing!
Log levels in ispconfig are for the server.sh cronjob, so not related to nginx.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 30th January 2013, 12:06
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: Mnchen
Posts: 364
Thanks: 39
Thanked 89 Times in 68 Posts
Default

ispconfig have nothing to do here. I mean nginx error_log directive. Sorry for the confusion
Reply With Quote
  #5  
Old 30th January 2013, 13:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
Default

You can try this:

http://robertfrew.wordpress.com/2011...ging-in-nginx/

You might also have to make sure your PHP confiuration allows for error logging:

http://forum.nginx.org/read.php?2,14...947#msg-147947

catch_workers_output = yes might be required in your pool configuration:

http://nginx.2469901.n2.nabble.com/N...td7413282.html

But it is also possible that you use a buggy PHP version:

https://bugs.php.net/bug.php?id=61045
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
pititis (30th January 2013)
  #6  
Old 30th January 2013, 17:12
pititis pititis is offline
Senior Member
 
Join Date: Dec 2010
Location: Mnchen
Posts: 364
Thanks: 39
Thanked 89 Times in 68 Posts
Default

Quote:
Originally Posted by falko View Post

But it is also possible that you use a buggy PHP version:

https://bugs.php.net/bug.php?id=61045
jawohl

Thank you.
Reply With Quote
  #7  
Old 31st January 2013, 17:09
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,749 Times in 2,579 Posts
 
Default

Just checked this on a test server: you should take a look at the PHP settings

display_errors

and

log_errors
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Tags
apps vhost, nginx, phpmyadmin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3 Single server issues on POP3/IMAP/ MyDNS vk1003 Installation/Configuration 7 17th July 2012 16:25
vhost issue ?! alicumircea General 2 31st January 2012 12:58
Ubuntu 11.10, ISPConfig 3.0.4.1 needs some nginx.conf tweaks after following guide. talkingnews Installation/Configuration 10 28th November 2011 22:55
ISPConfig3 plugable mail subsystem (for Google Apps) and nginx as alternative eugenesan Developers' Forum 49 20th February 2011 20:04
Apps Apache vhost Croydon Developers' Forum 6 4th July 2010 16:01


All times are GMT +2. The time now is 05:57.


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