https适用于本地IP地址,但不适用于具有应用程序端口的本地IP

时间:2017-05-10 06:06:34

标签: nginx https mattermost

我在我的服务器上安装了Mattermost,目前我可以通过浏览http://192.168.x.x:8066来登录它,我已为此IP安装了自签名证书,但当我尝试使用{{3进行浏览时它无法重定向到Mattermost页面。 下面是我的nginx.conf的配置:

    server {
        listen 443 http2 ssl;
        listen [::]:443 http2 ssl;
        listen 443;
        server_name 192.168.3.201:8066;
        ssl on;
        ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
        ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
        ssl_dhparam /etc/ssl/certs/dhparam.pem;
           }

但是,当我只浏览没有端口8066的URL时,它会显示默认的nginx页面,没有错误。 我的nginx.conf文件有什么问题?我还是nginx FYI的新手。 任何建议都将非常感谢。

1 个答案:

答案 0 :(得分:0)

我建议您按照文档here中的示例nginx配置进行操作。从该配置文件开始,将server_name更新为您希望可以访问的域名,并将server作为mattermost正在侦听的IP地址和端口。

一旦你开始工作,你可以继续执行#9的说明,其中包括设置SSL。

相关问题