nginx-运行php配置nginx.conf

server {
    listen       80;

    charset utf-8;
    access_log  /var/log/nginx/log/weapp-access.log  main;
    error_log   /var/log/nginx/log/weapp-error.log;

    root /data/release/zssise;
    index index.php index.html index.htm;

    location / {
        try_files $uri $uri/ /index.php?/$request_uri;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}


你可能感兴趣的:(服务器)