【问题标题】:configure nginx with wordpress用 wordpress 配置 nginx
【发布时间】:2022-06-23 02:45:03
【问题描述】:

我正在尝试使用 wordpress 配置 nginx。 Apache 服务器正在端口 8083 上运行。 wordpress 网址是 https://dhahbya.com

我的 nginx 配置文件是:

server {
        listen *:443 ssl;

        server_name www.dhahbya.com dhahbya.com;

        ssl_certificate ****************;
        ssl_certificate_key **************;

        location / {
                proxy_pass http://127.0.0.1:8083;
        }
}
server {
    listen      80;
    server_name *.dhahbya.com;

     return 301 https://$host$request_uri;
}

问题是当我尝试在网站中导航时,它会将我重定向到 127.0.0.1:8083。

【问题讨论】:

  • 尝试将proxy_set_header Host $host; 添加到您的位置块。
  • 页面重定向不正确。网站没有回复
  • 如果您收到了重定向,这意味着您正在收到响应。重定向响应。你得到的究竟是什么重定向?
  • www.dhahbya.com 该网站正在运行,您可以看到它重定向到该 IP 地址。如果我从 wordpress 管理员更改站点地址 (URL),它将不再有效。
  • 这不是我想要的答案。 究竟重定向响应中Location HTTP 标头的值是什么,包括 HTTP 方案和 IP:port 对之后的 URI?

标签: wordpress nginx


【解决方案1】:

解决方法是删除 apache 服务器并配置 nginx 以运行 wordpress。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-08-14
    • 2019-12-02
    • 2022-01-09
    • 2016-11-03
    • 2015-05-21
    • 2018-03-04
    • 1970-01-01
    相关资源
    最近更新 更多