Created
August 30, 2014 10:24
-
-
Save t-min/1ae17c3320f9562c2a5e to your computer and use it in GitHub Desktop.
nginxforwpc5.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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