Created
September 6, 2014 12:18
-
-
Save t-min/f28f7ff564de5abc29bd to your computer and use it in GitHub Desktop.
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 /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; | |
} | |
} | |
#---------------------------------------- | |
# 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