docker安装nginx无法访问
时间: 2023-09-25 12:10:25 浏览: 225
docker安装nginx无法访问的问题可能是由于端口未开启所致。你可以使用以下命令来开启端口8080:
sudo firewall-cmd --add-port=8080/tcp --permanent
然后使用以下命令来刷新防火墙配置:
firewall-cmd --reload
这样,在重新启动nginx后,你应该可以通过curl localhost:8080来查看nginx的页面了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [docker启动nginx 外网访问不了](https://blog.csdn.net/TimeShare1/article/details/108691202)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [docker nginx 运行后无法访问的问题解决](https://download.csdn.net/download/weixin_38516706/12899872)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文