Last active
November 21, 2015 23:09
-
-
Save serhiinkh/d033d76c09d56715ab33 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#map $status $loggable { | |
# ~^[2,3] 0; | |
# default 1; | |
#} | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
server_name ~^(www\.)?(?<domain>.+?).loc$; | |
root /home/nicebro/code/$domain/public; | |
index index.php index.html index.htm; | |
charset utf-8; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location = /favicon.ico { access_log off; log_not_found off; } | |
location = /robots.txt { access_log off; log_not_found off; } | |
#access_log /home/nicebro/code/logs/$domain-access.log combined if=$loggable; | |
error_log /home/nicebro/code/logs/error.log; | |
error_page 404 /index.php; | |
error_page 500 502 503 504 /index.php; | |
client_max_body_size 50M; | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment