Skip to content

Commit 72c45b2

Browse files
Nginx likes port 80
1 parent ac16459 commit 72c45b2

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
#!/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
2+
# trouble shooting why our server is not working
3+
rm /etc/nginx/sites-enabled/default
4+
ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
5+
service nginx restart

0 commit comments

Comments
 (0)