Created
June 11, 2017 14:07
-
-
Save richardlehane/9e45bd25a38adc325d1e0fabde140153 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
upstream atom { | |
server unix:/run/php7.0-fpm.atom.sock; | |
} | |
server { | |
listen 80; | |
root /usr/share/nginx/atom; | |
# http://wiki.nginx.org/HttpCoreModule#server_name | |
# _ means catch any, but it's better if you replace this with your server | |
# name, e.g. archives.foobar.com | |
server_name _; | |
client_max_body_size 72M; | |
# http://wiki.nginx.org/HttpCoreModule#try_files | |
location / { | |
try_files $uri /index.php?$args; | |
} | |
location ~ /\. { | |
deny all; | |
return 404; | |
} | |
location ~* (\.yml|\.ini|\.tmpl)$ { | |
deny all; | |
return 404; | |
} | |
location ~* /(?:uploads|files)/.*\.php$ { | |
deny all; | |
return 404; | |
} | |
location ~* /uploads/r/(.*)/conf/ { | |
} | |
location ~* ^/uploads/r/(.*)$ { | |
include /etc/nginx/fastcgi_params; | |
set $index /index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$index; | |
fastcgi_param SCRIPT_NAME $index; | |
fastcgi_pass atom; | |
} | |
location ~ ^/private/(.*)$ { | |
internal; | |
alias /usr/share/nginx/atom/$1; | |
} | |
location ~ ^/(index|qubit_dev)\.php(/|$) { | |
include /etc/nginx/fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
fastcgi_pass atom; | |
} | |
location ~* \.php$ { | |
deny all; | |
return 404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment