免费观看又色又爽又黄的小说免费_美女福利视频国产片_亚洲欧美精品_美国一级大黄大色毛片

Centos7.x下Nginx安裝及SSL配置與常用命令詳解

一、安裝

成都創(chuàng)新互聯(lián)從2013年開(kāi)始,是專(zhuān)業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站設(shè)計(jì)制作、網(wǎng)站制作網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元遼源做網(wǎng)站,已為上家服務(wù),為遼源各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18980820575

采用yum方式安裝

##自動(dòng)安裝
yum nginx
##啟動(dòng)
nginx

二、SSL及默認(rèn)端口配置

泛解析配置

server
{
  listen 443;
  server_name *.banacoo.cn;
  ssl on;
  ssl_certificate /etc/nginx/conf.d/1_banacoo.cn_bundle.crt;
  ssl_certificate_key /etc/nginx/conf.d/2_banacoo.cn.key;
  gzip on;
  gzip_buffers 16 8k;
  gzip_comp_level 6;
  gzip_min_length 200;
  gzip_types text/css text/xml application/javascript text/javascript application/x-javascript text/plan image/jpeg image/png image/gif;
  location /room/static {
    alias /home/room/;
  }
  location /statics {
    alias /home/quanyou/;
  }
  location / {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto https;

    if ($request_method = 'OPTIONS') {
       add_header 'Access-Control-Allow-Credentials' true;
       add_header 'Access-Control-Allow-Origin' "$http_origin";
       add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
       add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
       add_header 'Access-Control-Max-Age' 1728000;
       return 204;
    }
    if ($host ~ ^(uatapi)\.banacoo\.cn$){
       proxy_pass http://127.0.0.1:8033;
    }
    if ($host ~ ^(uatapp)\.banacoo\.cn$){
       proxy_pass http://127.0.0.1:8022;
    }
    if ($host ~ ^(uatai)\.banacoo\.cn$){
       proxy_pass http://127.0.0.1:8011;
    }
    if ($host ~ ^(uatui)\.banacoo\.cn$){
       proxy_pass http://127.0.0.1:9080;
    }
    if ($host ~ ^(uatmarket)\.banacoo\.cn$){
       proxy_pass http://127.0.0.1:8088;
    }
    if ($host ~ ^(uatmarketui)\.banacoo\.cn$){
       proxy_pass http://127.0.0.1:9089;
    }
    if ($host ~ ^(uateasyjoy)\.banacoo\.cn$){
       proxy_pass http://127.0.0.1:8036;
    }
  }
  access_log logs/banacoo.cn.access.log;
}
server
{
  listen 80;
  server_name uatmarketui.banacoo.cn;
  charset utf-8;
  gzip on;
  gzip_buffers 16 8k;
  gzip_comp_level 6;
  gzip_min_length 200;
  gzip_types text/css text/xml application/javascript text/javascript application/x-javascript text/plan image/jpeg image/png image/gif;
  location / {
   proxy_pass http://127.0.0.1:9089;
  }
  autoindex on;
  autoindex_exact_size off;
  autoindex_localtime on;
  access_log logs/uatmarketui.banacoo.cn.access.log;
}
server
{
  listen 80;
  server_name uatmarket.banacoo.cn;
  charset utf-8;
  gzip on;
  gzip_buffers 16 8k;
  gzip_comp_level 6;
  gzip_min_length 200;
  gzip_types text/css text/xml application/javascript text/javascript application/x-javascript text/plan image/jpeg image/png image/gif;
  location / {
   proxy_pass http://127.0.0.1:8088;
  }
  autoindex on;
  autoindex_exact_size off;
  autoindex_localtime on;
  access_log logs/uatmarket.banacoo.cn.access.log;
}

三、常用命令

##重新加載配置
nginx -s reload
##停止服務(wù)
nginx -s stop

以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持創(chuàng)新互聯(lián)。

名稱(chēng)欄目:Centos7.x下Nginx安裝及SSL配置與常用命令詳解
瀏覽路徑:http://m.newbst.com/article32/jicpsc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供GoogleApp設(shè)計(jì)外貿(mào)網(wǎng)站建設(shè)定制網(wǎng)站云服務(wù)器建站公司

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

網(wǎng)站托管運(yùn)營(yíng)