server {
listen 80;
server_name localhost;
location / {
root /data/eerrpp/erp/erp2.0;
index index.php index.html index.htm;
autoindex off;
if (!-e $request_filename) {
rewrite ^/(.*) /index.php last;
rewrite ^/(.+?\.php)/?(.*)$ /$1/$2 last;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php?.*$ {
root /data/eerrpp/erp/erp2.0;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME /data/eerrpp/erp/erp2.0$fastcgi_script_name;
include fastcgi_params;
}
location ~ .*\.(js|css)$
{
root /data/eerrpp/erp/erp2.0;
}
# location ~ /\.ht {
# deny all;
# }
}
nginx.conf 加载的配置 /data/eerrpp/erp/erp2.0 是框架入口