首页新闻找找看学习计划

nginx配置后出现的问题

0
悬赏园豆:5 [已解决问题] 解决于 2018-07-18 08:35

 

 

为什么IP访问和域名访问效果不一样????????

胖头陀的主页 胖头陀 | 初学一级 | 园豆:6
提问于:2018-05-31 23:46
< >
分享
最佳答案
0

你要跳一下啊

#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;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
    upstream www.wzpbk.com {
            server localhost:8080;
    }
    
    server {
        listen       80;
        server_name  www.wzpbk.com;
        #rewrite ^ https://$http_host$request_uri? permanent;
        return 301 https://$http_host$request_uri;
    }
server {
    listen 443;
    server_name www.wzpbk.com;
    ssl on;
    root html;
    index index.html index.htm;
    ssl_certificate   cert/111111.pem;
    ssl_certificate_key  cert/22222.key;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;
    location / {
        root html;
    proxy_pass http://www.wzpbk.com;
        index index.html index.htm;
    }
}
    


}

这是我的配置文件分享给你

收获园豆:5
DanBrown | 小虾三级 |园豆:1496 | 2018-06-01 08:00

 朋友我刚学nginx能跟我说下我什么原因么?然后我需要CP或模仿你哪段代码?

胖头陀 | 园豆:6 (初学一级) | 2018-06-01 09:16
DanBrown | 园豆:1496 (小虾三级) | 2018-06-01 09:37
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册