@@ -25,99 +25,104 @@ server {
2525 font/otf
2626 font/ttf
2727 image/svg+xml
28- image/x-icon
28+ image/x-icon
2929 text/css
3030 text/javascript
3131 text/plain
3232 text/xml;
33-
33+
3434 listen 443 ssl ;
3535 server_name localhost;
36- ssl_certificate /etc/nginx/certs/certificate.pem;
36+ ssl_certificate /etc/nginx/certs/certificate.pem;
3737 ssl_certificate_key /etc/nginx/certs/certificate.private.pem;
38-
39- # issue with ip and the nginx proxy
40- real_ip_header X-Forwarded-For;
41- set_real_ip_from 172.17.0.0 /16 ;
38+
39+ # issue with ip and the nginx proxy
40+ real_ip_header X-Forwarded-For;
41+ set_real_ip_from 172.17.0.0 /16 ;
4242
4343 #charset koi8-r;
4444 #access_log /var/log/nginx/host.access.log main;
4545
46- location / {
47- root /usr/share/nginx/html;
48- # First attempt to serve request as file, then
49- # as directory, then redirect to index(angular) if no file found.
50- try_files $uri $uri / /index .html;
46+ location / {
47+ root /usr/share/nginx/html;
48+ # First attempt to serve request as file, then
49+ # as directory, then redirect to index(angular) if no file found.
50+ try_files $uri $uri / /index .html;
5151 }
52-
53- location /api/v1 {
54- proxy_pass http ://${ IP_ADDRESS} :8081 ;
55- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
56- proxy_set_header X-Forwarded-Proto $scheme ;
57- proxy_set_header X-Forwarded-Port $server_port ;
58- # Headers required for web socket connections
59- proxy_set_header Upgrade $http_upgrade ;
60- proxy_set_header Connection $connection_upgrade ;
61- }
62-
63- location /null/v1 {
64- proxy_pass http ://${ IP_ADDRESS} :8083 ;
65- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
66- proxy_set_header X-Forwarded-Proto $scheme ;
67- proxy_set_header X-Forwarded-Port $server_port ;
68- }
69-
70- location /twitch-bot/v1 {
71- proxy_pass http ://${ IP_ADDRESS} :8086 ;
72- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
73- proxy_set_header X-Forwarded-Proto $scheme ;
74- proxy_set_header X-Forwarded-Port $server_port ;
75- }
76-
77- location /github-webhook {
78- proxy_pass http ://${ IP_ADDRESS} :8080 ;
79- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
80- proxy_set_header X-Forwarded-Proto $scheme ;
81- proxy_set_header X-Forwarded-Port $server_port ;
82- }
83-
84- location /multibranch-webhook-trigger {
85- proxy_pass http ://${ IP_ADDRESS} :8080 ;
86- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
87- proxy_set_header X-Forwarded-Proto $scheme ;
88- proxy_set_header X-Forwarded-Port $server_port ;
89- }
90-
91- # Verification for our SSL certificate with Let's Encrypt
92- location /.well-known {
93- root /usr/share/nginx/html;
94- # First attempt to serve request as file, then
95- # as directory, then redirect to index(angular) if no file found.
96- try_files $uri =404 ;
52+
53+ location /api/v1 {
54+ proxy_pass http ://${ IP_ADDRESS} :8081 ;
55+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
56+ proxy_set_header X-Forwarded-Proto $scheme ;
57+ proxy_set_header X-Forwarded-Port $server_port ;
58+ # Headers required for web socket connections
59+ proxy_set_header Upgrade $http_upgrade ;
60+ proxy_set_header Connection $connection_upgrade ;
61+ }
62+
63+ location /null/v1 {
64+ proxy_pass http ://${ IP_ADDRESS} :8083 ;
65+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
66+ proxy_set_header X-Forwarded-Proto $scheme ;
67+ proxy_set_header X-Forwarded-Port $server_port ;
68+ }
69+
70+ location /twitch-bot/v1 {
71+ proxy_pass http ://${ IP_ADDRESS} :8086 ;
72+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
73+ proxy_set_header X-Forwarded-Proto $scheme ;
74+ proxy_set_header X-Forwarded-Port $server_port ;
75+ }
76+
77+ location /github-webhook {
78+ proxy_pass http ://${ IP_ADDRESS} :8080 ;
79+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
80+ proxy_set_header X-Forwarded-Proto $scheme ;
81+ proxy_set_header X-Forwarded-Port $server_port ;
82+ }
83+
84+ location /multibranch-webhook-trigger {
85+ proxy_pass http ://${ IP_ADDRESS} :8080 ;
86+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for ;
87+ proxy_set_header X-Forwarded-Proto $scheme ;
88+ proxy_set_header X-Forwarded-Port $server_port ;
89+ }
90+
91+ # Verification for our SSL certificate with Let's Encrypt
92+ location /.well-known {
93+ root /usr/share/nginx/html;
94+ # First attempt to serve request as file, then
95+ # as directory, then redirect to index(angular) if no file found.
96+ try_files $uri =404 ;
9797 }
9898
9999 error_page 404 /404 .html;
100-
101- location ~ 404 {
102- root /usr/share/nginx/html;
103- try_files /404 .html =404 ;
104- }
105-
106- location ~ 404 .html {
107- root /usr/share/nginx/html;
108- try_files /404 .html =404 ;
109- }
100+
101+ location ~ 404 {
102+ root /usr/share/nginx/html;
103+ try_files /404 .html =404 ;
104+ }
105+
106+ location ~ 404 .html {
107+ root /usr/share/nginx/html;
108+ try_files /404 .html =404 ;
109+ }
110110
111111 # redirect server error pages to the static page /50x.html
112112 #
113113 error_page 500 502 503 504 /50x .html;
114114 location = /50x .html {
115115 root /usr/share/nginx/html;
116116 }
117+
118+ # Google search picked up things that don't exist, we need to get rid of them here
119+ location /angular {
120+ return 404 ;
121+ }
117122}
118123
119124server {
120125 listen 80 default_server;
121126 server_name _;
122127 return 301 https://$host$request_uri ;
123- }
128+ }
0 commit comments