nginx配置指定訪問路徑訪問
阿新 • • 發佈:2018-07-12
ast script rip ams scrip server zab pre cgi
server {
listen 8992;
server_name localhost;
location / { #此處填根目錄
index index.php index.html index.htm;
root /usr/local/nginx/html/zabbix; #配置訪問的路徑
}
location ~ \.php$ {
root /usr/local/nginx/html/zabbix; #配置訪問的路徑
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
兩個路徑正常
nginx配置指定訪問路徑訪問