@@ -25,99 +25,104 @@ server {
25
25
font/otf
26
26
font/ttf
27
27
image/svg+xml
28
- image/x-icon
28
+ image/x-icon
29
29
text/css
30
30
text/javascript
31
31
text/plain
32
32
text/xml;
33
-
33
+
34
34
listen 443 ssl ;
35
35
server_name localhost;
36
- ssl_certificate /etc/nginx/certs/certificate.pem;
36
+ ssl_certificate /etc/nginx/certs/certificate.pem;
37
37
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 ;
42
42
43
43
#charset koi8-r;
44
44
#access_log /var/log/nginx/host.access.log main;
45
45
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;
51
51
}
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 ;
97
97
}
98
98
99
99
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
+ }
110
110
111
111
# redirect server error pages to the static page /50x.html
112
112
#
113
113
error_page 500 502 503 504 /50x .html;
114
114
location = /50x .html {
115
115
root /usr/share/nginx/html;
116
116
}
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
+ }
117
122
}
118
123
119
124
server {
120
125
listen 80 default_server;
121
126
server_name _;
122
127
return 301 https://$host$request_uri ;
123
- }
128
+ }
0 commit comments