Skip to content

Commit b1c247a

Browse files
Fix nginx IPv6 listen.
1 parent 32111c9 commit b1c247a

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

icpc-wf/ansible/nginx-setup.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
path: /etc/nginx/sites-available/domjudge.conf
2929
marker: "{mark}"
3030
marker_begin: "### http host config ###"
31-
marker_end: "# Or block all HTTP requests"
31+
marker_end: "# Or block all cleartext HTTP requests"
3232
notify: restart nginx
3333

3434
- name: enable HTTP redirect and HTTPS blocks
@@ -39,27 +39,6 @@
3939
replace: '\1'
4040
notify: restart nginx
4141

42-
- name: remove IPv6 listens
43-
lineinfile:
44-
path: /etc/nginx/sites-available/domjudge.conf
45-
regexp: 'listen\s+\[.*\]:\d+;'
46-
state: absent
47-
notify: restart nginx
48-
49-
- name: change IPv4 HTTP listen to default server
50-
lineinfile:
51-
path: /etc/nginx/sites-available/domjudge.conf
52-
regexp: 'listen.*80;'
53-
line: "\tlisten 80 default_server;"
54-
notify: restart nginx
55-
56-
- name: change IPv4 HTTPS listen to all interfaces
57-
lineinfile:
58-
path: /etc/nginx/sites-available/domjudge.conf
59-
regexp: 'listen.*443;'
60-
line: "\tlisten 443 ssl http2 default_server;"
61-
notify: restart nginx
62-
6342
- name: increase max body size to upload size
6443
lineinfile:
6544
path: /etc/nginx/snippets/domjudge-inner

0 commit comments

Comments
 (0)