I've been having issues getting my NGINX setup running on my Debian box for our dev server,
this thing just does not want to work. I had it showing an info page (<?php phpinfo(); ?>) from
our IP for about ten minutes, then something broke somewhere and am just getting 404 input
not found messages now.I have been completely unable to get the DNS to resolve for whatever
reason and am at my whits ends, I've been cranking away at this for the last two days and am
up to my eyes in time loss. All help is greatly appr.
nginx.conf:
user www-data;
worker_processes 1;
events {
worker_connections 2048;
use epoll;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 20;
gzip on;
gzip_comp_level 6;
gzip_proxied any;
gzip_types text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
log_format main
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx_access.log main;
error_log /var/log/nginx_error.log debug;
#include /usr/local/nginx/sites-enabled/*;
include /etc/nginx/vhosts/*;
}
sites.conf:
server {
root /var/www/html;
listen *:80;
server_name dev2.xxx.org;
location / {
index index.php;
# if file exists return it right away
if (-f $request_filename) {
break;
}
if (-f $request_filename/index.html) {
rewrite (.*) $1/index.html break;
}
# otherwise rewrite the fucker
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php$1 last;
break;
}
}
# Process PHP files with fastcgi
location ~ \.php$ {
#if ( !-f $request_filename ) {
# return 404;
#}
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
# include /usr/local/nginx/conf/fastcgi_params;
fastcgi_ignore_client_abort on;
}
# if the request starts with our frontcontroller, pass it on to fastcgi
location ~ ^/index.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
# include /usr/local/nginx/conf/fastcgi_params;
fastcgi_ignore_client_abort on;
}
}
Logs are kept in /usr/local/nginx/logs/ but are not updating