Last active
December 21, 2017 02:01
-
-
Save bear/175aaa92fe8c83880415 to your computer and use it in GitHub Desktop.
nginx config for Known
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; | |
server_name example.net; | |
access_log /var/log/nginx/example-access.log; | |
error_log /var/log/nginx/example-error.log error; | |
root /srv/known; | |
location ~ /\.ht { | |
deny all; | |
} | |
location ~* \.(js|css)$ { | |
expires max; | |
log_not_found off; | |
} | |
location ~* \.(xml|ini)$ { | |
deny all; | |
} | |
location /(.*)$ { | |
index index.php; | |
try_files $uri $uri/ /index.php/$1; | |
} | |
location / { | |
index index.php; | |
try_files $uri $uri/ /index.php; | |
} | |
location ~ \.php { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_param PHP_VALUE "cgi.fix_pathinfo=0 \n upload_max_filesize=1000M \n post_max_size=1080M"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment