aboutsummaryrefslogtreecommitdiff
path: root/debian/personal-vps/nginx/conf.d/gist.conf
diff options
context:
space:
mode:
Diffstat (limited to 'debian/personal-vps/nginx/conf.d/gist.conf')
-rw-r--r--debian/personal-vps/nginx/conf.d/gist.conf41
1 files changed, 41 insertions, 0 deletions
diff --git a/debian/personal-vps/nginx/conf.d/gist.conf b/debian/personal-vps/nginx/conf.d/gist.conf
new file mode 100644
index 0000000..cae6608
--- /dev/null
+++ b/debian/personal-vps/nginx/conf.d/gist.conf
@@ -0,0 +1,41 @@
+server {
+ charset utf-8;
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
+ root /var/www/html/PrivateBin;
+ server_name gist.valentineus.link;
+
+ access_log off;
+ error_log /var/log/nginx/gist/error.log warn;
+
+ location ~* \.(jpg|jpeg|gif|css|png|js|map|woff|woff2|ttf|svg|eot)$ {
+ access_log off;
+ expires 30d;
+ }
+
+ location ~ ^/(data|cfg|tmp) {
+ deny all;
+ }
+
+ location ~* /(.*)\.(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ {
+ deny all;
+ }
+
+ location ~ /\. {
+ deny all;
+ }
+
+ location ~ [^/]\.(php|html|htm)(/|$) {
+ include fastcgi_params;
+ fastcgi_pass unix:/run/php/php7.3-fpm.sock;
+ fastcgi_index index.php;
+ fastcgi_param PATH_INFO $fastcgi_path_info;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ fastcgi_split_path_info ^(.+\.php)(/.+)$;
+ }
+
+ location / {
+ index index.php;
+ try_files $uri $uri/ /index.php;
+ }
+} \ No newline at end of file