Created
October 27, 2017 17:03
-
-
Save anonymous/f18b665c74d00f33b5d3efe4943ba978 to your computer and use it in GitHub Desktop.
Nginx configuration for withKnown on top of mailinabox
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 php-fpm { | |
server unix:/var/run/php5-fpm.sock; | |
} | |
# | |
server { | |
listen 443 ssl; | |
listen [::]:443 ssl; | |
server_name domain.tld; | |
# ... | |
location /css/ { | |
rewrite ^/css/[0-9]+/(.*) /css/$1 last; | |
} | |
location /js/ { | |
rewrite ^/js/[0-9]+/(.*) /js/$1 last; | |
} | |
location ~ (\.ini|known.php)$ { | |
deny all; | |
} | |
client_max_body_size 128M; | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_pass php-fpm; | |
} | |
} | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment