Last active
March 7, 2018 15:31
-
-
Save knaggit/4e123010ac03ed6861940eceec541191 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
server { | |
listen 443 default_server ssl http2; | |
listen [::]:443 default_server ssl http2 ipv6only=on; | |
root /var/www/starterkit; | |
index index.php index.html index.htm; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/cf.pem; | |
ssl_certificate_key /etc/nginx/ssl/cf.key; | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; | |
ssl_prefer_server_ciphers on; | |
server_name kirby.homevoice.io; | |
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; | |
fastcgi_param PATH_INFO $fastcgi_script_name; | |
include fastcgi_params; | |
} | |
rewrite ^/(content|site|kirby)$ /error last; | |
rewrite ^/content/(.*).(txt|md|mdown)$ /error last; | |
rewrite ^/(site|kirby)/(.*)$ /error last; | |
location / { | |
try_files $uri $uri/ /index.php?$uri&$args; | |
} | |
location /panel { | |
try_files $uri $uri/ /panel/index.php?$uri&$args; | |
} | |
location ~ (?:^|/)\. { | |
deny all; | |
} | |
location ~ (?:\.(?:bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$ { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment