From 9d1d0ada3a3e73a4b08c62d7d06f587d0907b335 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Tue, 28 Apr 2020 15:34:13 +0400 Subject: Initial NGINX Signed-off-by: Valentin Popov --- debian/personal-vps/nginx/conf.d/gist.conf | 41 ++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 debian/personal-vps/nginx/conf.d/gist.conf (limited to 'debian/personal-vps/nginx/conf.d/gist.conf') 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 -- cgit v1.2.3