内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

Nginx怎么配置域名重寫和泛域名解析

本篇內(nèi)容主要講解“Nginx怎么配置域名重寫和泛域名解析”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學習“Nginx怎么配置域名重寫和泛域名解析”吧!

成都創(chuàng)新互聯(lián)公司2013年成立,是專業(yè)互聯(lián)網(wǎng)技術服務公司,擁有項目做網(wǎng)站、成都網(wǎng)站制作網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元新絳做網(wǎng)站,已為上家服務,為新絳各地企業(yè)和個人服務,聯(lián)系電話:18980820575

具體代碼如下:

#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;
 
 #設置允許發(fā)布內(nèi)容為8m
 client_max_body_size 20m;
 client_body_buffer_size 512k;
 
 add_header access-control-allow-origin *; 
 add_header access-control-allow-headers x-requested-with; 
 add_header access-control-allow-methods get,post,options; 
 
 server { 
 listen  80; 
 server_name www.xxx.com; 
 location / { 
 proxy_pass http://127.0.0.1:8080; 
 proxy_set_header host $host; 
 proxy_set_header x-real-ip $remote_addr; 
 proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; 
 } 
 }
 
 server { 
 listen  80; 
 server_name www.aaa.com; 
 location / { 
 proxy_pass http://127.0.0.1:9989; 
 proxy_set_header host $host; 
 proxy_set_header x-real-ip $remote_addr; 
 proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; 
 } 
 }
 
 
 #泛域名解析
 server { 
 listen  80; 
 server_name *.web.yuyuyun.cn; 
 location / { 
 # 泛域名開始配置
 if ( $host ~* (.*)\.(.*)\.(.*)\.(.*) ) {
 set $domain $1; #獲取當前的 域名前綴
 }
 proxy_pass http://127.0.0.1:1119/$domain/; 
 proxy_set_header host $host; 
 proxy_set_header x-real-ip $remote_addr; 
 proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; 
 } 
 
 } 
 
}

到此,相信大家對“Nginx怎么配置域名重寫和泛域名解析”有了更深的了解,不妨來實際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關內(nèi)容可以進入相關頻道進行查詢,關注我們,繼續(xù)學習!

文章標題:Nginx怎么配置域名重寫和泛域名解析
文章地址:http://www.rwnh.cn/article18/gjhgdp.html

成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供面包屑導航手機網(wǎng)站建設、域名注冊、網(wǎng)站制作云服務器、動態(tài)網(wǎng)站

廣告

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

小程序開發(fā)
黑河市| 台东县| 肃北| 车险| 临猗县| 洞头县| 安庆市| 汉川市| 从江县| 三都| 南召县| 库伦旗| 封开县| 措美县| 新邵县| 龙海市| 揭西县| 苗栗市| 都昌县| 阿坝县| 长泰县| 阜阳市| 伊川县| 灵川县| 东乡| 合水县| 武冈市| 博罗县| 伊宁县| 吉木萨尔县| 犍为县| 宁都县| 黎平县| 依安县| 乌兰县| 资阳市| 海盐县| 潮州市| 乐亭县| 昭觉县| 云和县|