Skip to content

Instantly share code, notes, and snippets.

@ponych
Created May 17, 2013 13:46
Show Gist options
  • Save ponych/5599120 to your computer and use it in GitHub Desktop.
Save ponych/5599120 to your computer and use it in GitHub Desktop.
for j7 rewrite settings
#
server {
listen 80;
server_name xyj front.xyj admin.xyj userfront.xyj shopback.xyj shopfront.xyj develop.xyj group.xyj;
root /Users/eric/web/xyj/web;
index index.php index.htm index.html;
# begin of rewrite
#location / {
# try_files $uri @rewriteapp;
#}
#location @rewriteapp {
# rewrite ^(.*)$ /index.php/$1 last;
#}
if (!-f $request_filename) {
rewrite ^/(.+)$ /index.php?/$1 last;
}
# end of rewrite
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 80;
server_name douban.local;
root /Users/eric/web/douban.local/web;
index index.php index.html index.htm;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment