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 ac16459 commit 72c45b2Copy full SHA for 72c45b2
0x0E-web_stack_debugging_1/0-nginx_likes_port_80
@@ -1,12 +1,5 @@
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
+# trouble shooting why our server is not working
+rm /etc/nginx/sites-enabled/default
+ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
+service nginx restart
0 commit comments