|
@@ -0,0 +1,39 @@
|
|
|
|
|
+server {
|
|
|
|
|
+ client_max_body_size 4g;
|
|
|
|
|
+ server_tokens off;
|
|
|
|
|
+ server_name gitote.in;
|
|
|
|
|
+
|
|
|
|
|
+ proxy_set_header X-Real-IP $remote_addr; # pass on real client IP
|
|
|
|
|
+
|
|
|
|
|
+ location / {
|
|
|
|
|
+ proxy_pass http://localhost:8080;
|
|
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
+ proxy_set_header Host $http_host;
|
|
|
|
|
+ proxy_set_header X-NginX-Proxy true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ location /heartbeat {
|
|
|
|
|
+ default_type text/plain;
|
|
|
|
|
+ return 200 "Heartbeat";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ listen 443 ssl; # managed by Certbot
|
|
|
|
|
+ ssl_certificate /etc/certs/fullchain.pem;
|
|
|
|
|
+ ssl_certificate_key /etc/certs/privkey.pem;
|
|
|
|
|
+ #ssl_certificate /etc/letsencrypt/live/gitote.in/fullchain.pem; # managed by Certbot
|
|
|
|
|
+ #ssl_certificate_key /etc/letsencrypt/live/gitote.in/privkey.pem; # managed by Certbot
|
|
|
|
|
+ #include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
|
|
|
+ #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+server {
|
|
|
|
|
+ if ($host = gitote.in) {
|
|
|
|
|
+ return 301 https://$host$request_uri;
|
|
|
|
|
+ } # managed by Certbot
|
|
|
|
|
+
|
|
|
|
|
+ server_name gitote.in;
|
|
|
|
|
+ listen 80;
|
|
|
|
|
+ return 404; # managed by Certbot
|
|
|
|
|
+}
|