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

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

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

瀏覽:204日期: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久久,三上悠亚国产精品一区二区三区
日韩免费视频| 亚洲五月综合| 极品日韩av| 日韩高清在线不卡| 欧洲激情综合| 美日韩一区二区三区| 久久裸体视频| 国产精品2023| 久久亚洲色图| 欧美日韩在线二区| caoporn视频在线| 日本成人精品| 天堂成人免费av电影一区 | 国产欧美另类| 在线午夜精品| 国产精品qvod| 亚洲精品字幕| 91成人精品| 亚洲调教视频在线观看| 日韩久久视频| 日韩理论片av| 亚洲二区视频| 激情婷婷综合| 婷婷精品进入| 午夜在线视频观看日韩17c| 国产一区清纯| 国产偷自视频区视频一区二区| 日韩欧美中文| 亚洲成人三区| 蜜臀av性久久久久蜜臀aⅴ四虎| 日韩视频在线一区二区三区| 伊伊综合在线| 欧美 日韩 国产一区二区在线视频| 日韩欧美精品综合| 国产亚洲精品v| 久久青草久久| 国产高潮在线| 日韩av一二三| 亚州av一区| 日韩在线一二三区| 性一交一乱一区二区洋洋av| 日韩欧美一区免费| 91欧美在线| 久久一区国产| 精品欧美视频| 国产精选久久| 六月天综合网| 亚洲欧美伊人| 久久久久久免费视频| 久久要要av| 日韩制服丝袜先锋影音| 精品亚洲a∨一区二区三区18| 视频小说一区二区| 亚洲三级网址| 国产精品亚洲欧美一级在线| 精品日韩视频| 国产精品15p| 亚洲少妇自拍| 欧美久久香蕉| 欧美日韩精品在线一区| 噜噜噜躁狠狠躁狠狠精品视频| 视频一区免费在线观看| 久久久久久色| 欧美国产极品| 黄色日韩在线| 欧美+日本+国产+在线a∨观看| 波多野结衣久久精品| 婷婷综合社区| 国产 日韩 欧美一区| 精品日产乱码久久久久久仙踪林| 国产精品亚洲成在人线| 亚洲精品成a人ⅴ香蕉片| 午夜电影亚洲| 亚洲欧洲一区二区天堂久久| 91久久视频| 日韩欧美精品一区二区综合视频| 麻豆成人在线观看| 欧美激情日韩| 人在线成免费视频| 麻豆视频在线看| 精品中文在线| 最新亚洲国产| 亚洲欧美日韩国产一区| 日韩二区在线观看| 日本一区二区三区视频在线看| 少妇精品在线| 久久久久国产精品一区三寸| 亚洲永久字幕| 新版的欧美在线视频| 亚洲欧美网站在线观看| 国产伊人久久| 久久久久中文| 福利一区二区| 国产精品3区| 免费黄网站欧美| 日韩精品一区二区三区中文字幕| 99国产精品一区二区| 国产精品一区二区av日韩在线| 欧美日韩夜夜| 精品免费av在线| 欧美日韩尤物久久| 欧美亚洲自偷自偷| 久久av导航| 婷婷综合五月| 久久精品伊人| 激情久久99| 伊人国产精品| 国产丝袜一区| 免费在线成人| 正在播放日韩精品| 无码日韩精品一区二区免费| 麻豆理论在线观看| 9999国产精品| 日韩福利在线观看| 国产精品毛片久久| 亚洲精品一区二区在线播放∴| 欧美亚洲人成在线| 成人台湾亚洲精品一区二区 | 久久激情婷婷| 亚洲一区日韩在线| 国产一区二区三区不卡视频网站| 免费观看久久久4p| 欧洲亚洲一区二区三区| 国产精品xxx| 亚洲一区二区三区高清| 日韩一区二区三区在线看| 亚洲精品视频一二三区| 亚洲另类视频| 国产精品久久久久久妇女 | 色婷婷色综合| 中文字幕人成乱码在线观看| 激情久久中文字幕| 久久精品国产68国产精品亚洲| 国产精品日韩| 国产精品宾馆| 国产精品巨作av| 国产欧美自拍一区| 青青青国产精品| 国产午夜精品一区在线观看| 中文在线а√天堂| 久久久久久网| 高清av不卡| 久久国产电影| 99国产精品自拍| 一区二区三区国产在线| 蜜桃久久久久久久| 亚洲欧洲免费| 国产精品夜夜夜| 欧美日韩亚洲一区三区| 国产精品日韩精品中文字幕| 精品一区二区三区中文字幕| 成人亚洲一区二区| 欧美日韩国产在线观看网站 | 91高清一区| 香蕉成人久久| 亚洲精品动态| 国产精品一区2区3区| 福利一区和二区| 欧美日韩精品免费观看视完整 | 日韩精品一二三四| 欧美影院精品| 激情综合五月| 午夜国产欧美理论在线播放| 久久国产精品毛片| 日韩av中文字幕一区| 国产成人精品一区二区免费看京| zzzwww在线看片免费| 九一精品国产| 91亚洲精品在看在线观看高清| 精品一区二区三区亚洲| 国产91一区| 中文欧美日韩| 欧美偷窥清纯综合图区| 日韩不卡一区| 久久国产精品久久w女人spa| 国产精品九九| 久久久久久美女精品| 午夜性色一区二区三区免费视频| 麻豆成人在线观看| 99热精品在线观看| 国产精品日韩精品在线播放 | 国产一区二区三区网| 午夜日韩在线| 欧美精品二区| 黄色免费成人| 欧美综合精品| 久久亚洲国产| 国产剧情在线观看一区| 久久久久久久久久久9不雅视频| 少妇精品久久久一区二区| 超碰在线99| 日韩激情av在线| 久久久久久黄| 国产精品久av福利在线观看| 国产精品7m凸凹视频分类| 久久激情av| 最新日韩欧美| 国产一区二区三区不卡视频网站 | 日韩精品91| 欧美视频久久|