5
5
# - Nginx variables (like $proxy_add_x_forwarded_for, $host, $http_upgrade) must be escaped
6
6
# - Use ${ DOLLAR} environment variable to represent literal $ in nginx config
7
7
# - Example: ${ DOLLAR} proxy_add_x_forwarded_for becomes $proxy_add_x_forwarded_for
8
- #
9
- # TODO: Fix the commented HTTPS configuration section below
10
- # - The HTTPS configuration has inconsistent variable escaping
11
- # - Some nginx variables use literal $ (incorrect) while others should use ${ DOLLAR}
12
- # - Line 117: proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; (needs ${ DOLLAR} )
13
- # - Lines with $host, $http_upgrade, $connection_upgrade also need escaping
14
- # - SSL certificate paths and other static values are correct as-is
15
8
16
9
server
17
10
{
@@ -63,125 +56,3 @@ server
63
56
root /var/www/html;
64
57
}
65
58
}
66
-
67
- #server
68
- #{
69
- # listen 443 ssl http2;
70
- # listen [::]:443 ssl http2;
71
- # server_name tracker.torrust-demo.com;
72
- #
73
- # server_tokens off;
74
- #
75
- # ssl_certificate /etc/letsencrypt/live/tracker.torrust-demo.com/fullchain.pem;
76
- # ssl_certificate_key /etc/letsencrypt/live/tracker.torrust-demo.com/privkey.pem;
77
- #
78
- # ssl_buffer_size 8k;
79
- #
80
- # ssl_dhparam /etc/ssl/certs/dhparam-2048.pem;
81
- #
82
- # ssl_protocols TLSv1.2;
83
- # ssl_prefer_server_ciphers on;
84
- #
85
- # ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:! ADH:! AECDH:! MD5;
86
- #
87
- # ssl_ecdh_curve secp384r1;
88
- # ssl_session_tickets off;
89
- #
90
- # ssl_stapling on;
91
- # ssl_stapling_verify on;
92
- # resolver 8.8.8.8;
93
- #
94
- # location /api/
95
- # {
96
- # try_files $uri @tracker-api;
97
- # }
98
- #
99
- # location /
100
- # {
101
- # try_files $uri @tracker-http;
102
- # }
103
- #
104
- # location @tracker-api
105
- # {
106
- # proxy_pass http://tracker:1212;
107
- # add_header X-Frame-Options " SAMEORIGIN" always;
108
- # add_header X-XSS-Protection " 1; mode=block" always;
109
- # add_header X-Content-Type-Options " nosniff" always;
110
- # add_header Referrer-Policy " no-referrer-when-downgrade" always;
111
- # add_header Content-Security-Policy " default-src * data: 'unsafe-eval' 'unsafe-inline'" always;
112
- # #add_header Strict-Transport-Security " max-age=31536000; includeSubDomains; preload" always;
113
- # # enable strict transport security only if you understand the implications
114
- # }
115
- #
116
- # location @tracker-http
117
- # {
118
- # proxy_pass http://tracker:7070;
119
- # add_header X-Frame-Options " SAMEORIGIN" always;
120
- # add_header X-XSS-Protection " 1; mode=block" always;
121
- # add_header X-Content-Type-Options " nosniff" always;
122
- # add_header Referrer-Policy " no-referrer-when-downgrade" always;
123
- # add_header Content-Security-Policy " default-src * data: 'unsafe-eval' 'unsafe-inline'" always;
124
- # #add_header Strict-Transport-Security " max-age=31536000; includeSubDomains; preload" always;
125
- # # enable strict transport security only if you understand the implications
126
- #
127
- # proxy_set_header X-Forwarded-For ${DOLLAR} proxy_add_x_forwarded_for;
128
- # }
129
- #
130
- # root /var/www/html;
131
- # index index.html index.htm index.nginx-debian.html;
132
- #}
133
-
134
- ## This is required to proxy Grafana Live WebSocket connections.
135
- #map $http_upgrade $connection_upgrade {
136
- # default upgrade;
137
- # ' ' close;
138
- #}
139
- #
140
- #upstream grafana {
141
- # server grafana:3000;
142
- #}
143
- #
144
- #server
145
- #{
146
- # listen 443 ssl http2;
147
- # listen [::]:443 ssl http2;
148
- # server_name grafana.torrust-demo.com;
149
- #
150
- # server_tokens off;
151
- #
152
- # ssl_certificate /etc/letsencrypt/live/grafana.torrust-demo.com/fullchain.pem;
153
- # ssl_certificate_key /etc/letsencrypt/live/grafana.torrust-demo.com/privkey.pem;
154
- #
155
- # ssl_buffer_size 8k;
156
- #
157
- # ssl_dhparam /etc/ssl/certs/dhparam-2048.pem;
158
- #
159
- # ssl_protocols TLSv1.2;
160
- # ssl_prefer_server_ciphers on;
161
- #
162
- # ssl_ciphers ECDH+AESGCM:ECDH+AES256:ECDH+AES128:DH+3DES:! ADH:! AECDH:! MD5;
163
- #
164
- # ssl_ecdh_curve secp384r1;
165
- # ssl_session_tickets off;
166
- #
167
- # ssl_stapling on;
168
- # ssl_stapling_verify on;
169
- # resolver 8.8.8.8;
170
- #
171
- # location / {
172
- # proxy_set_header Host $host ;
173
- # proxy_pass http://grafana;
174
- # }
175
- #
176
- # # Proxy Grafana Live WebSocket connections.
177
- # location /api/live/ {
178
- # proxy_http_version 1.1;
179
- # proxy_set_header Upgrade $http_upgrade ;
180
- # proxy_set_header Connection $connection_upgrade ;
181
- # proxy_set_header Host $host ;
182
- # proxy_pass http://grafana;
183
- # }
184
- #
185
- # root /var/www/html;
186
- # index index.html index.htm index.nginx-debian.html;
187
- #}
0 commit comments