diff --git a/configs/README.md b/configs/README.md index f000d42..0f73789 100644 --- a/configs/README.md +++ b/configs/README.md @@ -1,3 +1,6 @@ # Configuration Files -This folder contains Debian configuration files with notable changes from common defaults. \ No newline at end of file +This folder contains Debian configuration files with notable changes from common defaults. + +* `cjdroute.conf` -> `/etc/cjdroute.conf`: CJDNS configuration +* `nginx` -> `/etc/nginx/sites-enabled/default`: NGINX configuration \ No newline at end of file diff --git a/configs/nginx b/configs/nginx new file mode 100644 index 0000000..ceb613d --- /dev/null +++ b/configs/nginx @@ -0,0 +1,38 @@ +# /etc/nginx/sites-enabled/default + +proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=bizappcache:20m max_size=1g inactive=24h use_temp_path=off; + +server { + listen 80 default_server; + listen [::]:80 default_server; + + root /var/www/html; + + index index.php index.html index.htm index.nginx-debian.html; + + server_name _; + + # Accelerator + location /accelerator { + # Don't allow access from CJDNS, closes possible DoS/security hole + deny fc00::/8; + try_files $uri $uri/ =404; + } + + # PHP-FPM + location ~ \.php$ { + include snippets/fastcgi-php.conf; + fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; + } + + # Caching proxy + location ^~ / { + proxy_cache bizappcache; + proxy_pass https://test.netsyms.biz/; + add_header X-Cache-Status $upstream_cache_status; + } + + location ~ /\.ht { + deny all; + } +}