Created
October 6, 2015 08:41
-
-
Save wicochandra/2bcf3d8b760b94d35e19 to your computer and use it in GitHub Desktop.
Nginx Dynamic Project configuration
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
server { | |
listen 80; | |
set $project_dir /home/wico/Projects; | |
server_name ~^(?<project>.+)\.lvh\.me$; | |
index index.php index.html index.htm; | |
root $project_dir/$project/public; | |
client_max_body_size 1G; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ ^/(_front-end|_frontend)\/? { | |
root $project_dir/$project/; | |
autoindex on; | |
index _; | |
location ~ \.php$ { | |
include snippets/fastcgi-php.conf; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
} | |
} | |
location ~ \.php$ { | |
include snippets/fastcgi-php.conf; | |
fastcgi_read_timeout 600; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_param PHP_VALUE "upload_max_filesize=1G | |
post_max_size=1G"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment