nginx配置指定访问路径访问

server {
        listen       8992;
        server_name localhost;
        location / {  #此处填根目录
                index index.php index.html index.htm;
        }
        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;
        }

猜你喜欢

转载自blog.51cto.com/yht1990/2140980