码迷,mamicode.com
首页 > 其他好文 > 详细

nginx 多端口 配置 多个二级域名 无效

时间:2018-05-13 11:49:32      阅读:444      评论:0      收藏:0      [点我收藏+]

标签:二级域名   rem   real   etc   protocol   local   ddr   sha   www.   

server {
listen 80;
#listen 443 ssl;
server_name www.lovebugs.com lovebugs.com;
#ssl on;
ssl_certificate /etc/nginx/cert/214592172780915.pem;
ssl_certificate_key /etc/nginx/cert/214592172780915.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 / {

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header Host $http_host;

        proxy_pass http://localhost:9527;

proxy_redirect off;
break;

    }
    

}

server {

listen 80;
#listen 443 ssl;
server_name www.api.lovebugs.com api.lovebugs.com;
#ssl on;
ssl_certificate  /etc/nginx/cert/214592172780915.pem;
ssl_certificate_key /etc/nginx/cert/214592172780915.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 / {

    proxy_set_header X-Real-IP $remote_addr;

    proxy_set_header Host $http_host;

    proxy_pass http://localhost:9528;

proxy_redirect off;
break;
}
}

server {
listen 80;
#listen 443 ssl;
server_name www.manage.lovebugs.com manage.lovebugs.com;
#ssl on;
ssl_certificate /etc/nginx/cert/214592172780915.pem;
ssl_certificate_key /etc/nginx/cert/214592172780915.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 / {

    proxy_set_header X-Real-IP $remote_addr;

    proxy_set_header Host $http_host;

    proxy_pass http://localhost:8080; 

proxy_redirect off;
break;

}

}

server {
listen 8080;
server_name localhost;
#ssl on;
#ssl_certificate /etc/nginx/cert/214592172780915.pem;
#ssl_certificate_key /etc/nginx/cert/214592172780915.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;
root /app/blog-manage/dist;
# root /usr/share/nginx/html;
index index.html index.htm;

}

nginx 多端口 配置 多个二级域名 无效

标签:二级域名   rem   real   etc   protocol   local   ddr   sha   www.   

原文地址:https://www.cnblogs.com/WhiteHorseIsNotHorse/p/9031208.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!