Skip to content

Instantly share code, notes, and snippets.

@notgosu
Created February 1, 2017 07:59
Show Gist options
  • Save notgosu/e33c8d420061422e91f145cc86f8d0f9 to your computer and use it in GitHub Desktop.
Save notgosu/e33c8d420061422e91f145cc86f8d0f9 to your computer and use it in GitHub Desktop.
server {
listen 80;
server_name mindguid.com;
client_max_body_size 100m;
root /web/mindguide/frontend/web/;
index index.php;
error_log /var/log/nginx/front.error.log;
access_log /var/log/nginx/front.access.log combined;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 600;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
}
server {
listen 80;
server_name mgadmin.mindguid.com;
client_max_body_size 100m;
root /web/mindguide/backend/web/;
index index.php;
error_log /var/log/nginx/back.error.log;
access_log /var/log/nginx/back.access.log combined;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 600;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment