We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c78cc03 commit 8dd2a7bCopy full SHA for 8dd2a7b
0x0E-web_stack_debugging_1/0-nginx_likes_port_80
@@ -0,0 +1,12 @@
1
+#!/usr/bin/env bash
2
+# Check Nginx configuration for port 80 listening
3
+
4
+grep -q "listen\s\+80;" /etc/nginx/nginx.conf
5
6
+if [ $? -ne 0 ]; then
7
+ # Add listen directive for port 80 in nginx.conf
8
+ sed -i '/^http\s*{/a \ listen 80;' /etc/nginx/nginx.conf
9
10
+ # Restart Nginx
11
+ systemctl restart nginx
12
+fi
0x0E-web_stack_debugging_1/1
@@ -0,0 +1,3 @@
+sed: couldn't open temporary file /etc/nginx/sedcRt4no: Permission denied
+System has not been booted with systemd as init system (PID 1). Can't operate.
+Failed to connect to bus: Host is down
0 commit comments