Fafnir777
Newbie | Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору NGINX + spawn-fcgi + PHP 5.2.6 NGINX отдает только sitename.com/script.php При создании подкаталога, например вида sitename.com/subdir/script.php, выбрасывает 404. Конфиг ******************************************* user www; worker_processes 2; pid /var/run/nginx.pid; error_log /var/log/nginx-error.log warn; events { worker_connections 1024; use kqueue; } http { include mime.types; default_type application/octet-stream; # log options log_format main '$remote_addr - $remote_user [$time_local] ' '"$request" $status $bytes_sent ' '"$http_referer" "$http_user_agent" ' '"$gzip_ratio"'; # nginx options sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; server_tokens off; # fastcgi fastcgi_intercept_errors on; server { listen 80; server_name localhost; access_log /var/log/nginx.log main; location ~* ^.+\.(php)$ { fastcgi_pass 127.0.0.1:1026; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx$fastcgi_script_name; include fastcgi_params; } location / { root /usr/local/www/mydomain; index index.php index.html index.htm; } } server { listen 80; server_name sitename.com www.sitename.com; access_log /var/log/nginx.log main; location ~* ^.+\.(php)$ { fastcgi_pass 127.0.0.1:1026; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/www/sitename.com$fastcgi_script_name; include fastcgi_params; } location / { root /usr/local/www/sitename.com; index index.php index.html index.htm; } } } |