php配置教程ecstore,Ecstore伪静态配置
我自己的nginx.conf文件,僅供參考user www www;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
index index.php index.html index.htm;
root /data/www;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name 192.168.51.67;
if ( $host ~* (.*)\.(.*)\.(.*)){
set $domain $1;
}
location ~ ^/(.*)/data/.*\.(php)?$
{
return 404;
deny all;
}
location ~ ^/(.*)/public/.*\.(php)?$
{
return 404;
deny all;
}
location ~ ^/(.*)/themes/.*\.(php)?$
{
return 404;
deny all;
}
location ~ ^/(.*)/wap_themes/.*\.(php)?$
{
return 404;
deny all;
}
#偽靜態配置開始.....
if ($request_uri ~ (.+?\.php)(|/.*)$ ){
break;
}
location / {
autoindex on;
send_timeout 1800;
fastcgi_buffers 8 128k;
fastcgi_intercept_errors on;
#偽靜態配置
if ( !-e $request_filename ) {
rewrite ^/(.*)$ /index.php/$1 last;
}
}
location ~ ^/shopadmin {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
#偽靜態配置結束......
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php {
include fastcgi_params;
set $real_script_name $fastcgi_script_name;
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}
}
}
總結
以上是生活随笔為你收集整理的php配置教程ecstore,Ecstore伪静态配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ecstore网站换服务器,ECStor
- 下一篇: 电流互感器在低压配电系统中的选型方案