大网数据广告活动
服务器运维问答

How to setup Nginx/Apache on Oracle Cloud Instance?

· 52CE 我爱测

My server IP is 132.145.167.69 . I have set up Nginx and allowed inbound/outbound traffic, still not able to open the IP in the browser or get anything in Nginx access.log . On Server: curl -I http://localhost:80 HTTP/1.1 200 OK …

问题原文

原帖链接 · Milind Singh · CC BY-SA 4.0

My server IP is 132.145.167.69. I have set up Nginx and allowed inbound/outbound traffic, still not able to open the IP in the browser or get anything in Nginx access.log.

On Server:

curl -I http://localhost:80
HTTP/1.1 200 OK
Server: nginx/1.14.0 (Ubuntu)
Date: Fri, 27 Sep 2019 14:04:05 GMT
Content-Type: text/html
Content-Length: 612
Last-Modified: Fri, 20 Sep 2019 05:18:46 GMT
Connection: keep-alive
ETag: "5d846136-264"
Accept-Ranges: bytes

On My System:

curl -I http://132.145.167.69:80
HTTP/1.1 503 Service Unavailable
Server: squid/3.5.27
Mime-Version: 1.0
Date: Fri, 27 Sep 2019 14:04:37 GMT
Content-Type: text/html;charset=utf-8
Content-Length: 3484
X-Squid-Error: ERR_CONNECT_FAIL 60
Vary: Accept-Language
Content-Language: en
X-Cache: MISS from localhost
X-Cache-Lookup: MISS from localhost:3128
Via: 1.1 localhost (squid/3.5.27)
Connection: keep-alive

Can anyone guide me in the right direction?

已采纳解答

原帖链接 · Milind Singh · CC BY-SA 4.0

The issue was with iptables, I had to manually add entries for the port 80 and 443.

sudo iptables -I INPUT 2 -p tcp --dport 443 -j ACCEPT
sudo iptables -I INPUT 2 -p tcp --dport 80 -j ACCEPT
sudo iptables-save > /etc/iptables/rules.v4

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-09-27)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。