aboutsummaryrefslogtreecommitdiffstats
path: root/nginx.conf
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2025-01-14 21:13:58 +0000
committerterminaldweller <devi@terminaldweller.com>2025-01-14 21:13:58 +0000
commit233b5b943ac5dbdd54f4418cda74fa037d8cf6a2 (patch)
tree7998cace15d0e90df120cd7e2815b700fb05af20 /nginx.conf
parentfixed a typo in the subject name for the self-signed cert (diff)
downloadicanhazallips-233b5b943ac5dbdd54f4418cda74fa037d8cf6a2.tar.gz
icanhazallips-233b5b943ac5dbdd54f4418cda74fa037d8cf6a2.zip
using nginx as reverse proxy nowHEADmain
Diffstat (limited to 'nginx.conf')
-rw-r--r--nginx.conf36
1 files changed, 36 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..5a9c8a3
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,36 @@
+events {
+ worker_connections 4096;
+}
+
+http {
+ include /etc/nginx/mime.types;
+ server_tokens off;
+ limit_req_zone $binary_remote_addr zone=one:10m rate=30r/m;
+ server {
+ listen 443 ssl;
+ keepalive_timeout 60;
+ charset utf-8;
+ ssl_certificate /certs/server.cert;
+ ssl_certificate_key /certs/server.key;
+ ssl_ciphers HIGH:!aNULL:!MD5:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
+ ssl_protocols TLSv1.3;
+ ssl_session_cache shared:SSL:50m;
+ ssl_session_timeout 1d;
+ ssl_session_tickets off;
+ ssl_prefer_server_ciphers on;
+ tcp_nopush on;
+ add_header X-Content-Type-Options "nosniff" always;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header Content-Security-Policy "default-src 'self';";
+ add_header X-Frame-Options SAMEORIGIN always;
+ add_header X-XSS-Protection "1; mode=block" always;
+ add_header Referrer-Policy "no-referrer";
+ fastcgi_hide_header X-Powered-By;
+
+ error_page 401 403 404 /404.html;
+ location / {
+ proxy_pass http://icanhazallips:8080;
+ proxy_set_header X-Forwaded-For $proxy_add_x_forwarded_for;
+ }
+ }
+}