這是本文件的舊版!
server { listen 80; server_name ~^(www\.)?test202.com; root /var/www/html/test2; #charset koi8-r; access_log /var/log/nginx/test-access.log main; error_log /var/log/nginx/test-error.log; # error_page 404 /index.php; # if (!-e $request_filename) # { # rewrite ^(.+)$ /index.php?q=$1 last; # } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { #error_page 404 /404.html; if (!-f $request_filename) { return 404; } fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; } #error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } }