Skip to content

Instantly share code, notes, and snippets.

@t-min
Created September 15, 2014 13:12
Show Gist options
  • Save t-min/ebbc6bb7a49794b1c3ec to your computer and use it in GitHub Desktop.
Save t-min/ebbc6bb7a49794b1c3ec to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name localhost;
# $document_root にパスをセット
root /usr/share/nginx/html;
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
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;
}
#----------------------------------------
# concrete57
#----------------------------------------
location =/web/ {
rewrite ^ /web/index.php;
}
location /web {
if ( !-e $request_filename ) {
rewrite ^ /web/index.php last;
}
}
#----------------------------------------
# concrete56
#----------------------------------------
location =/concrete56/ {
rewrite ^ /concrete56/index.php;
}
location /concrete56 {
if ( !-e $request_filename ) {
rewrite ^ /concrete56/index.php last;
}
}
#----------------------------------------
# php一般
#----------------------------------------
location ~\.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
include fastcgi_params;
fastcgi_read_timeout 1020;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment