Skip to content

Instantly share code, notes, and snippets.

@bear
Last active December 21, 2017 02:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bear/175aaa92fe8c83880415 to your computer and use it in GitHub Desktop.
Save bear/175aaa92fe8c83880415 to your computer and use it in GitHub Desktop.
nginx config for Known
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