aboutsummaryrefslogtreecommitdiff
path: root/debian/personal-vps/nginx/conf.d/gist.conf
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-04-28 14:34:13 +0300
committerValentin Popov <info@valentineus.link>2020-04-28 14:34:13 +0300
commit9d1d0ada3a3e73a4b08c62d7d06f587d0907b335 (patch)
tree014f7b1d93aba308db4d440ec0cec15b550a9768 /debian/personal-vps/nginx/conf.d/gist.conf
parent69a48b5f9bc19ba9f523417c519b53373925e920 (diff)
downloaddotfiles-9d1d0ada3a3e73a4b08c62d7d06f587d0907b335.tar.xz
dotfiles-9d1d0ada3a3e73a4b08c62d7d06f587d0907b335.zip
Initial NGINX2020-04-28
Signed-off-by: Valentin Popov <info@valentineus.link>
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