账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    已经获取到证书,也配置好了nginx,并且也安装了ssl模块,重启后443接口没有启动
    54
    0

    以下是nginx配置,重启也没有报错,但是443接口并没有启动,想知道为什么?

    
    #user  nobody;
    worker_processes  1;
    
    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
    
    #pid        logs/nginx.pid;
    
    
    events {
        worker_connections  1024;
    }
    
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
    
        #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
        #                  '$status $body_bytes_sent "$http_referer" '
        #                  '"$http_user_agent" "$http_x_forwarded_for"';
    
        #access_log  logs/access.log  main;
    
        sendfile        on;
        #tcp_nopush     on;
    
        #keepalive_timeout  0;
        keepalive_timeout  65;
    
        #gzip  on;
    
    
        server {
            listen       80;
            server_name xx.com  www.xx.com;
    
            #charset koi8-r;
    
            #access_log  logs/host.access.log  main;
    
            location / {
             proxy_pass http://127.0.0.1:9339;
            #root   /;
                #index  index.html index.htm;
            }
    
            #error_page  404              /404.html;
    
            # redirect server error pages to the static page /50x.html
            #
            error_page   500 502 503 504  /50x.html;
            location = /50x.html {
                root   html;
            }
    
            # proxy the PHP scripts to Apache listening on 127.0.0.1:80
            #
            #location ~ \.php$ {
            #    proxy_pass   http://127.0.0.1;
            #}
    
            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            #
            #location ~ \.php$ {
            #    root           html;
            #    fastcgi_pass   127.0.0.1:9000;
            #    fastcgi_index  index.php;
            #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
            #    include        fastcgi_params;
            #}
    
            # deny access to .htaccess files, if Apache's document root
            # concurs with nginx's one
            #
            #location ~ /\.ht {
            #    deny  all;
            #}
        }
    
    
        # another virtual host using mix of IP-, name-, and port-based configuration
        #
        server {
            listen       80;
        #    listen       somename:8080;
            server_name  myterm.xx.com;
    
            location / {
        #        root   html;
        #        index  index.html index.htm;
        proxy_pass  http://www.yozosann.com:8256/;
            }
        }
    
    
        # HTTPS server
        #
        server {
             listen       443;
             server_name  xx.com  www.xx.com;
    
             ssl                  on;
             ssl_certificate      /usr/local/nginx/ssl/www.xx.com-ca-bundle.crt;
             ssl_certificate_key  /usr/local/nginx/ssl/www.xx.com.key;
    
             ssl_session_timeout  5m;
    
             ssl_protocols  SSLv2 SSLv3 TLSv1;
             ssl_ciphers  HIGH:!aNULL:!MD5;
             ssl_prefer_server_ciphers   on;
    
            location / {
                 proxy_pass http://127.0.0.1:9339;
        #        root   html;
        #        index  index.html index.htm;
             }
         }
    
    }
    
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 人酷又会撩つ 普通会员 1楼

      这个问题可能是由于以下几种原因造成的:

      1. Nginx 服务未启动:请检查 Nginx 是否已经启动。可以使用 systemctl status nginx 来检查。

      2. SSL模块未正确安装:请检查 SSL 模块是否已经正确安装。如果没有安装,可以使用 sudo apt-get install openssl 来安装。

      3. 证书问题:请检查证书是否正确。可以使用 openssl x509 -noout -in cert.pem -text -out cert.pem 来查看证书信息。

      4. Nginx 配置问题:请检查 Nginx 的配置文件,确认是否正确配置了 SSL。可以使用 nginx -t 来检查配置文件。

      5. 服务器问题:请检查服务器是否可以正常访问。可以使用 curl -s https://yourserver.com 来测试。

      如果以上步骤都无法解决问题,建议联系专业的 Nginx 或 SSL 服务提供商进行咨询。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部