
20th November 2011, 12:21
|
|
Junior Member
|
|
Join Date: Nov 2010
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
|
|
ERROR 503 nginx
Hello all,
iam trying tot setup a test server with the following config:
http://www.howtoforge.com/perfect-se...ispconfig-3-p7
But for some reason, i just can't get my dynamic scripts, php to get working on the Vhost site. But static files DO work.....
|

21st November 2011, 10:54
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Please check your nginx error log and your PHP-FPM logs.
|

22nd November 2011, 14:13
|
|
Junior Member
|
|
Join Date: Nov 2010
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Quote:
Originally Posted by falko
Please check your nginx error log and your PHP-FPM logs.
|
Hello Falko, i did a reinstall to be sure i did not made a mistake, so the logs dated from the new and fresh install:
HTML Code:
Php stuff logs, followd by nginx.
[22-Nov-2011 13:29:45] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful
[22-Nov-2011 13:29:45] NOTICE: fpm is running, pid 1580
[22-Nov-2011 13:29:45] NOTICE: ready to handle connections
[22-Nov-2011 13:30:48] NOTICE: Terminating ...
[22-Nov-2011 13:30:48] NOTICE: exiting, bye-bye!
[22-Nov-2011 13:30:48] NOTICE: fpm is running, pid 6254
[22-Nov-2011 13:30:48] NOTICE: ready to handle connections
[22-Nov-2011 13:44:55] NOTICE: fpm is running, pid 22931
[22-Nov-2011 13:44:55] NOTICE: ready to handle connections
[22-Nov-2011 13:48:56] NOTICE: fpm is running, pid 23182
[22-Nov-2011 13:48:56] NOTICE: ready to handle connections
[22-Nov-2011 14:01:03] NOTICE: Terminating ...
[22-Nov-2011 14:01:03] NOTICE: exiting, bye-bye!
[22-Nov-2011 14:01:03] NOTICE: fpm is running, pid 23582
[22-Nov-2011 14:01:03] NOTICE: ready to handle connections
---------------------------------------
2011/11/22 13:44:16 [crit] 22402#0: *1 connect() to unix:/var/lib/php5-fpm/ispconfig.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.56.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "192.168.56.130:8080"
2011/11/22 13:45:11 [error] 22402#0: *1 FastCGI sent in stderr: "PHP Notice: Undefined index: login in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139" while reading response header from upstream, client: 192.168.56.1, server: _, request: "POST /content.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "192.168.56.130:8080", referrer: "http://192.168.56.130:8080/"
2011/11/22 13:45:11 [error] 22402#0: *1 FastCGI sent in stderr: "PHP Notice: Undefined offset: 3 in /usr/local/ispconfig/interface/web/dashboard/dashboard.php on line 103
PHP Notice: Undefined offset: 3 in /usr/local/ispconfig/interface/web/dashboard/dashboard.php on line 103
PHP Notice: Undefined offset: 3 in /usr/local/ispconfig/interface/web/dashboard/dashboard.php on line 110
PHP Notice: Undefined offset: 3 in /usr/local/ispconfig/interface/web/dashboard/dashboard.php on line 110" while reading response header from upstream, client: 192.168.56.1, server: _, request: "GET /dashboard/dashboard.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "192.168.56.130:8080", referrer: "http://192.168.56.130:8080/index.php"
2011/11/22 13:45:18 [error] 22402#0: *1 FastCGI sent in stderr: "PHP Notice: Undefined index: country in /usr/local/ispconfig/interface/web/client/form/client.tform.php on line 223" while reading response header from upstream, client: 192.168.56.1, server: _, request: "GET /client/client_edit.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "192.168.56.130:8080", referrer: "http://192.168.56.130:8080/index.php"
2011/11/22 13:45:27 [error] 22402#0: *1 FastCGI sent in stderr: "PHP Notice: Undefined index: country in /usr/local/ispconfig/interface/web/client/form/client.tform.php on line 223
PHP Notice: Undefined index: limit_client in /usr/local/ispconfig/interface/web/client/client_edit.php on line 146
PHP Notice: Undefined index: on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139
PHP Notice: Undefined index: client:on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139
PHP Notice: Undefined index: client:client:on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139
PHP Notice: Undefined index: return_to_url in /usr/local/ispconfig/interface/lib/classes/tform_actions.inc.php on line 218" while reading response header from upstream, client: 192.168.56.1, server: _, request: "POST /client/client_edit.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "192.168.56.130:8080", referrer: "http://192.168.56.130:8080/index.php"
2011/11/22 13:45:31 [error] 22402#0: *1 FastCGI sent in stderr: "PHP Notice: Undefined index: web_id in /usr/local/ispconfig/interface/web/sites/ajax_get_json.php on line 38" while reading response header from upstream, client: 192.168.56.1, server: _, request: "GET /sites/ajax_get_json.php?1321965928284&server_id=1&type=getservertype HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "192.168.56.130:8080", referrer: "http://192.168.56.130:8080/index.php"
2011/11/22 13:45:49 [error] 22402#0: *1 FastCGI sent in stderr: "PHP Notice: Undefined variable: page_form in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 463
PHP Notice: Trying to get property of non-object in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 463
PHP Notice: Undefined variable: page_form in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 464
PHP Notice: Trying to get property of non-object in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 464
PHP Notice: Undefined variable: page_form in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 465
PHP Notice: Trying to get property of non-object in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 465
PHP Notice: Undefined variable: page_form in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 466
PHP Notice: Trying to get property of non-object in /usr/local/ispconfig/interface/web/sites/web_domain_edit.php on line 466
PHP Notice: Undefined index: on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139
PHP Notice: Undefined index: sites:on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139
PHP Notice: Undefined index: return_to_url in /usr/local/ispconfig/interface/lib/classes/tform_actions.inc.php on line 218" while reading response header from upstream, client: 192.168.56.1, server: _, request: "POST /sites/web_domain_edit.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "192.168.56.130:8080", referrer: "http://192.168.56.130:8080/index.php"
2011/11/22 13:46:01 [error] 22402#0: *1 FastCGI sent in stderr: "PHP Notice: Undefined index: on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139
PHP Notice: Undefined index: sites:on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139
PHP Notice: Undefined index: sites:ftp_user:on_after_insert in /usr/local/ispconfig/interface/lib/classes/plugin.inc.php on line 139
PHP Notice: Undefined index: return_to_url in /usr/local/ispconfig/interface/lib/classes/tform_actions.inc.php on line 218" while reading response header from upstream, client: 192.168.56.1, server: _, request: "POST /sites/ftp_user_edit.php HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php5-fpm/ispconfig.sock:", host: "192.168.56.130:8080", referrer: "http://192.168.56.130:8080/index.php"
Please notice that i run ispconfig and a simple php info files just works, but a board and or drupal install won't work, error 503...
Update: I solved the problem! It seems, when there is a php script that needs a DB connection, but the DB connection has not been set, it spits out that error...
Last edited by demon326; 22nd November 2011 at 14:38.
|
|
The Following User Says Thank You to demon326 For This Useful Post:
|
falko (23rd November 2011)
|

24th November 2011, 16:26
|
|
Junior Member
|
|
Join Date: Nov 2010
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
|
|
i ran into a new problem... the main site is working fine, but the phpbb board spits out the 503 error, althoug is connected with the database...
i have the following nginx Directives:
Code:
# search for already compressed files
gzip_static on;
gzip on;
# some images have no mime type
default_type image/jpeg;
# 404 generated from php can be rather slow. Uncomment with care
error_page 404 /index.php;
# disallow access to version control directory, but return 404, not to disclose information
location /.git {
return 404;
}
# robots.txt is important for search engines
location /robots.txt {
access_log off;
}
# This is mostly based on Drupal's stock .htaccess
location ~* ^.+(\.(txt|engine|inc|info|install|module|profile|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)|code-style\.pl|/Entries.*|/Repository|/Root|/Tag|/Template)$ {
return 404;
}
# serve imagecache files directly or redirect to drupal if they do not exist
location ~* imagecache {
access_log off;
expires 30d;
try_files $uri @drupal;
}
# Drupal 7 image stylef
location ~* image/generate {
access_log off;
expires 30d;
try_files $uri @drupal;
}
# serve static files directly
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|swf|flv)$ {
access_log off;
log_not_found off;
expires 30d;
}
location @rewrite {
# Some modules enforce no slash (/) at the end of the URL
# Else this rewrite block wouldn't be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
break;
}
# This rewrites pages to be sent to PHP processing
location @drupal {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
location / {
try_files $uri @cache;
}
# This will try to see if we have a boost file in place. no harm done if this is not used
location @cache {
# queries, drupal cookies, or not GET methods, all require PHP processing.
if ($query_string ~ ".+") {
return 405;
}
if ($http_cookie ~ "DRUPAL_UID" ) {
return 405;
}
if ($request_method !~ ^(GET|HEAD)$ ) {
return 405;
}
error_page 405 = @drupal;
# Drupal uses 1978 - I am 4 years older than Dries :)
add_header Expires "Tue, 22 Sep 1974 08:00:00 GMT";
add_header Cache-Control "must-revalidate, post-check=0, pre-check=0";
try_files /cache/normal/$host/${uri}_.html /cache/mobile/$host/${uri}_.html /cache/perm/$host/${uri}_.css /cache/perm/$host/${uri}_.js /cache/$host/0$uri.html /cache/$host/0${uri}/index.html @drupal;
}
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include /etc/nginx/fastcgi_params;
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;
fastcgi_intercept_errors on;
}
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
root /usr/share/;
}
}
location /phpMyAdmin {
rewrite ^/* /phpmyadmin last;
}
|

25th November 2011, 18:02
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,593 Times in 2,444 Posts
|
|
Please check your logs again.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 04:56.
|
Recent comments
19 hours 45 min ago
1 day 5 hours ago
1 day 6 hours ago
1 day 9 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 16 hours ago
2 days 2 hours ago
2 days 7 hours ago
2 days 8 hours ago