Skip to content

Instantly share code, notes, and snippets.

@t-min
Created August 30, 2014 10:24
Show Gist options
  • Save t-min/1ae17c3320f9562c2a5e to your computer and use it in GitHub Desktop.
Save t-min/1ae17c3320f9562c2a5e to your computer and use it in GitHub Desktop.
nginxforwpc5.conf
server {
listen 80;
server_name localhost;
# $document_root にパスをセット
root /var/www;
location / {
root /var/www;
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 =/concrete57/ {
rewrite ^ /concrete57/index.php;
}
location /concrete57 {
if ( !-e $request_filename ) {
rewrite ^ /concrete57/index.php last;
}
}
#----------------------------------------
# php一般
#----------------------------------------
location ~\.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$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