【问题标题】:why did nginx setup always redirect to port 8888为什么nginx设置总是重定向到8888端口
【发布时间】:2016-01-15 20:51:43
【问题描述】:

我在我的 Mac OSX 上设置了一个新的 nginx 服务器,默认设置监听端口 8080,这是我第一次运行 nginx,但后来当我对 /usr/local/etc/ 执行任何操作时nginx/nginx.conf,浏览器一直重定向 localhost:8080 到 localhost:8888 无论如何,

到目前为止我已经尝试过:

nginx -s 停止 & nginx

brew 卸载 nginx --force

brew 安装 nginx

杀死所有 nginx

清理浏览器缓存

这些都不起作用....有什么帮助吗?

【问题讨论】:

    标签: redirect nginx port listen


    【解决方案1】:

    在 /usr/local/etc/nginx/nginx.conf 中将服务器块中的监听指令更改为

        listen       8000;
    

    然后,重新加载配置...

    sudo nginx -s reload
    

    浏览至http://localhost:8000。这应该会为您解决问题。

    【讨论】:

    • 对不起,这并不能解决我的问题......我最终只是使用 8888 作为我的 nginx 监听端口
    猜你喜欢
    • 1970-01-01
    • 2018-06-16
    • 2018-09-11
    • 1970-01-01
    • 1970-01-01
    • 2014-07-02
    • 1970-01-01
    • 2015-08-10
    • 1970-01-01
    相关资源
    最近更新 更多