日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区

您的位置:首頁技術文章
文章詳情頁

配置文件 - nginx多站點配置,無法通過域名訪問,使用ip訪問會跳轉到其中一個站點

瀏覽:200日期:2024-06-25 09:02:50

問題描述

在一臺服務器設置了Nginx多站點,但是訪問這些站點的域名均無法訪問,錯誤如下圖:配置文件 - nginx多站點配置,無法通過域名訪問,使用ip訪問會跳轉到其中一個站點

通過ip會跳轉到其中一個站點,具體表現為:

全部配置開啟的情況下所有域名無法訪問,ip訪問顯示的是siteD去除siteD后跳轉siteB,去除siteB后404,去除siteB后跳轉siteA,去除siteA后跳轉siteC

檢查了半天還是不知道是啥問題,請各位大神幫忙排查下/w

以下為具體配置文件:

nginx.conf

user nginx;worker_processes 1;error_log /var/log/nginx/error.log warn;pid/var/run/nginx.pid;events { worker_connections 1024;}http { include /etc/nginx/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 /var/log/nginx/access.log main; sendfileon; #tcp_nopush on; server_tokens off; underscores_in_headers off; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf;}

default.conf

server { listen 80; server_name _; location / {return 404; }}

siteA.conf

server { listen 80; server_name siteA.domain.com; access_log /var/log/nginx/siteA.access.log main; location / {root /usr/share/nginx/html/siteA;index index.php index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html {root /usr/share/nginx/html; } location ~ .php$ { #try_files $uri =404; #root /usr/share/nginx/html/siteA; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/dev/shm/php5.6-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_index index.php; include fastcgi_params; }}

siteB.conf

server { listen 80; server_name siteB.domain.com; access_log /var/log/nginx/siteB.access.log main; location / {root /usr/share/nginx/html/siteB;index index.php index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html {root /usr/share/nginx/html; } location ~ .php$ { try_files $uri =404; root /usr/share/nginx/html/siteB; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/dev/shm/php5.6-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_index index.php; include fastcgi_params; }}

siteC.conf

server { listen 80; server_name siteC.domain.com; access_log /var/log/nginx/siteC.access.log main; location / {root /usr/share/nginx/html/siteC/;index index.php index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html {root /usr/share/nginx/html; } location ~ .php$ { try_files $uri =404; root /usr/share/nginx/html/siteC/; fastcgi_split_path_info ^(.+.php)(/.+)$; fastcgi_pass unix:/dev/shm/php5.6-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_index index.php; include fastcgi_params; }}

siteD.conf

server { listen 80; server_name siteD.domain.com; access_log /var/log/nginx/siteD.access.log main; location ~ ^/(baidu|webscan|yx_scan) {root /usr/share/nginx/siteD; } 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 User-Agent $http_user_agent; proxy_set_header Accept-Encoding ''; proxy_redirect off; proxy_pass http://127.0.0.1:8080/siteD/; rewrite ^/WebGoat/(.*)$ /$1 last; } error_page 500 502 503 504 /50x.html; location = /50x.html {root /usr/share/nginx/html; }}

Nginx Info (使用apt安裝,mainline)

nginx version: nginx/1.11.9built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) built with OpenSSL 1.0.1f 6 Jan 2014TLS SNI support enabledconfigure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt=’-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC’ --with-ld-opt=’-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie’

Nginx Debug Error Log

2017/02/22 11:29:27 [notice] 6335#6335: using the 'epoll' event method2017/02/22 11:29:27 [notice] 6335#6335: nginx/1.11.92017/02/22 11:29:27 [notice] 6335#6335: built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)2017/02/22 11:29:27 [notice] 6335#6335: OS: Linux 3.13.0-100-generic2017/02/22 11:29:27 [notice] 6335#6335: getrlimit(RLIMIT_NOFILE): 1000000:10000002017/02/22 11:29:27 [notice] 6336#6336: start worker processes2017/02/22 11:29:27 [notice] 6336#6336: start worker process 63372017/02/22 11:30:27 [info] 6337#6337: *1 client timed out (110: Connection timed out) while waiting for request, client: 117.34.28.13, server: 0.0.0.0:802017/02/22 11:30:49 [info] 6337#6337: *2 client timed out (110: Connection timed out) while waiting for request, client: 47.90.50.49, server: 0.0.0.0:802017/02/22 11:38:44 [info] 6337#6337: *3 client timed out (110: Connection timed out) while waiting for request, client: 183.61.236.14, server: 0.0.0.0:802017/02/22 11:38:44 [info] 6337#6337: *4 client timed out (110: Connection timed out) while waiting for request, client: 124.95.168.140, server: 0.0.0.0:802017/02/22 11:38:45 [info] 6337#6337: *5 client timed out (110: Connection timed out) while waiting for request, client: 61.182.137.6, server: 0.0.0.0:802017/02/22 11:38:46 [info] 6337#6337: *6 client timed out (110: Connection timed out) while waiting for request, client: 117.27.149.14, server: 0.0.0.0:802017/02/22 11:38:50 [info] 6337#6337: *7 client timed out (110: Connection timed out) while waiting for request, client: 42.236.7.68, server: 0.0.0.0:802017/02/22 11:38:58 [info] 6337#6337: *8 client timed out (110: Connection timed out) while waiting for request, client: 124.95.168.140, server: 0.0.0.0:802017/02/22 11:38:59 [info] 6337#6337: *9 client timed out (110: Connection timed out) while waiting for request, client: 61.182.137.6, server: 0.0.0.0:802017/02/22 11:38:59 [info] 6337#6337: *10 client timed out (110: Connection timed out) while waiting for request, client: 183.61.236.14, server: 0.0.0.0:802017/02/22 11:39:02 [info] 6337#6337: *11 client timed out (110: Connection timed out) while waiting for request, client: 117.27.149.14, server: 0.0.0.0:802017/02/22 11:39:12 [info] 6337#6337: *12 client timed out (110: Connection timed out) while waiting for request, client: 124.95.168.140, server: 0.0.0.0:802017/02/22 11:39:12 [info] 6337#6337: *13 client timed out (110: Connection timed out) while waiting for request, client: 61.182.137.6, server: 0.0.0.0:802017/02/22 11:39:15 [info] 6337#6337: *14 client timed out (110: Connection timed out) while waiting for request, client: 183.61.236.14, server: 0.0.0.0:80

問題解答

回答1:

此問題已在v2ex獲得解答,由@Showfom 解答,原因為域名沒有備案,被機房屏蔽了

回答2:

貌似缺省值的default,不用通配符比較好

server { listen 80 default; return 404 ’no site found’;}回答3:

檢查域名是否被有效的解析到服務器, 若未被正確解析, 在域名運營商處設置正確解析.

檢查服務器防火墻設置, 時候開啟 80 端口訪問限制, 另也檢查服務器運營商是否也有設置防火墻設定.

在配置好 nginx 后, 可在服務器進行測試是否可用.

curl siteA.domain.com

若域名處于未解析狀態

echo ’127.0.0.1 siteA.domain.com’ >> /etc/hostssystemctl restart nginxcurl siteA.domain.com

服務器若不能正常訪問, 則問題出現在 nginx 配置上.服務器若能訪問, 而本地不行, 則問題就發生在域名解析或防火墻.

從我所知不多的 nginx 配置知識上來看, 沒有太大毛病.

日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区
欧美中文字幕一区二区| 免费精品视频| 日本一区二区三区视频在线看 | 亚洲精一区二区三区| 视频在线观看一区二区三区| 先锋影音国产一区| 亚洲精品影视| 国产欧美一区二区三区精品观看 | 精品免费视频| 国产精品高颜值在线观看| 精品亚洲a∨| 日韩欧美网址| 99久久精品网| 亚洲精品一区二区在线看| 99热精品在线| 日本一不卡视频| 国产黄色一区| 欧美亚洲日本精品| 五月天综合网站| 免费日韩视频| 欧美日韩亚洲一区二区三区在线| 国产精品片aa在线观看| 国产精品免费精品自在线观看| 欧美国产极品| 日韩一区二区在线免费| 欧美特黄a级高清免费大片a级| 首页亚洲欧美制服丝腿| 国产精品综合色区在线观看| 高清一区二区| jiujiure精品视频播放| 日韩视频1区| 精品国产一区二区三区性色av| 精精国产xxxx视频在线播放| 蜜臀久久99精品久久久久宅男| 国产精品中文字幕亚洲欧美| 亚洲欧洲高清| 日韩在线网址| 国产精品国产一区| 蜜桃视频在线观看一区二区| 精品国产午夜肉伦伦影院| 免费人成精品欧美精品| 国产成年精品| 日本亚洲不卡| 欧美 日韩 国产一区二区在线视频 | 欧美三级精品| 日本va欧美va瓶| 国产美女视频一区二区| 国产综合激情| 亚洲久久一区| 麻豆国产一区| 久久一区二区中文字幕| 亚洲视频二区| 久久99性xxx老妇胖精品| 亚洲午夜精品久久久久久app| 国产精品外国| 欧美a级一区二区| 欧美日韩色图| 色婷婷精品视频| 亚洲精品一级二级三级| 久久av超碰| 视频一区在线视频| 久久精品99国产国产精| 国产va免费精品观看精品视频| 久久国产日本精品| 午夜久久av | 亚洲欧洲高清| 四虎成人精品一区二区免费网站| 国产在线日韩精品| 99久久夜色精品国产亚洲狼| 亚洲麻豆一区| 欧美13videosex性极品| 亚洲综合日本| 久久精品午夜| 丝袜亚洲另类欧美| 国产精品精品| 欧美一级全黄| 亚洲国产影院| 免费在线观看一区| 亚洲综合精品| 老司机免费视频一区二区三区| 欧美日韩视频| 久久男人av资源站| 日韩精品三级| 精品国产亚洲一区二区三区大结局 | 四虎国产精品免费观看| 日韩在线麻豆| 在线日韩欧美| 精品久久99| 日韩高清在线不卡| 婷婷激情综合| 精品国产免费人成网站| 蜜臀久久99精品久久久久久9| 国产乱子精品一区二区在线观看| 91久久国产| 日韩欧美一区二区三区在线视频| 欧美一区免费| 精品一区三区| www在线观看黄色| 国产精品密蕾丝视频下载| 影音国产精品| 国产成人精品免费视| 国产亚洲人成a在线v网站 | 日韩.com| 蜜桃久久久久久| 国产精品主播| 在线精品观看| 一本大道色婷婷在线| 亚洲深夜福利| 久久精品电影| 日韩国产精品久久久| 美女精品网站| 亚洲精品成人| 久久人人88| 伊人久久国产| 国产91欧美| 精品免费在线| 国产精品精品国产一区二区| 你懂的网址国产 欧美| 久久国产尿小便嘘嘘| 人人爽香蕉精品| 亚洲国产日韩欧美在线| 色爱av综合网| 三上悠亚国产精品一区二区三区| 精品国产亚洲一区二区三区在线 | 免费成人性网站| 亚洲欧美日韩精品一区二区| 久久久影院免费| 国产在线欧美| 欧美精品一线| 播放一区二区| 欧美.日韩.国产.一区.二区 | 午夜久久免费观看| 成人在线视频中文字幕| 国产日韩免费| 国内揄拍国内精品久久| 日韩av免费大片| av最新在线| 群体交乱之放荡娇妻一区二区| 丝袜诱惑一区二区| 久久久水蜜桃av免费网站| 欧美综合二区| 日韩精品亚洲专区| 国产精久久一区二区| 久久福利在线| 欧美成a人片免费观看久久五月天| 日韩国产在线观看| 夜夜嗨网站十八久久| 亚洲影院天堂中文av色| 欧美日韩在线精品一区二区三区激情综合| 日韩成人在线看| 中文久久精品| 欧美交a欧美精品喷水| 一区在线观看| 国产亚洲一区二区手机在线观看 | 国产欧美欧美| 精品久久精品| 激情丁香综合| 亚洲日产国产精品| 亚洲免费专区| 日韩国产精品久久久久久亚洲| 国产极品模特精品一二| 日韩欧美一区免费| 日韩中文字幕一区二区三区| 五月精品视频| 日本va欧美va精品发布| 精品久久久网| 亚洲综合精品四区| 国产亚洲字幕| 亚洲性色av| 亚洲一区二区三区四区电影| 国产精品三级| 久久精品影视| 午夜亚洲福利| 国产精品激情电影| 日韩欧美一区二区三区在线视频| 国产精品一区二区av日韩在线| 欧美另类中文字幕| 免费久久99精品国产自在现线| 国产精品天堂蜜av在线播放| 在线中文字幕播放| 国产亚洲午夜| 久久69成人| 国产亚洲毛片| 精品国产一区二区三区av片| 亚洲精品中文字幕乱码| 国产福利亚洲| 丝袜国产日韩另类美女| 首页国产精品| 伊伊综合在线| 日韩精品免费一区二区夜夜嗨 | 日韩午夜视频在线| 欧美成a人国产精品高清乱码在线观看片在线观看久 | 青青国产91久久久久久| 欧产日产国产精品视频| 日韩毛片一区| 亚洲一区二区毛片| yellow在线观看网址| 日本h片久久| 99国产精品久久久久久久| 国产福利资源一区|