您好,欢迎访问一九零五行业门户网

nginx配置虚拟主机不行

想配置m.test.com的
server { listen 80; # ipv4 server_name m.test.com; ## parametrization using hostname of access and log filenames. access_log logs/localhost_access.log; error_log logs/localhost_error.log; ## root and index files. root html/test; index index.php index.html index.htm; ## if no favicon exists return a 204 (no content error). location = /favicon.ico { try_files $uri =204; log_not_found off; access_log off; } ## don't log robots.txt requests. location = /robots.txt { allow all; log_not_found off; access_log off; } ## try the requested uri as files before handling it to php. location / { ## regular php processing. location ~ \.php$ { try_files $uri =404; fastcgi_pass php_processes; fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_name; include fastcgi_params; } ## static files location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf)$ { expires max; log_not_found off; ## no need to bleed constant updates. send the all shebang in one ## fell swoop. tcp_nodelay off; ## set the os file cache. open_file_cache max=1000 inactive=120s; open_file_cache_valid 45s; open_file_cache_min_uses 2; open_file_cache_errors off; } ## keep a tab on the 'big' static files. location ~* ^.+\.(?:ogg|pdf|pptx?)$ { expires 30d; ## no need to bleed constant updates. send the all shebang in one ## fell swoop. tcp_nodelay off; } } # / location}

root应该是网站根目录吧,然后访问了
回复内容: 想配置m.test.com的
server { listen 80; # ipv4 server_name m.test.com; ## parametrization using hostname of access and log filenames. access_log logs/localhost_access.log; error_log logs/localhost_error.log; ## root and index files. root html/test; index index.php index.html index.htm; ## if no favicon exists return a 204 (no content error). location = /favicon.ico { try_files $uri =204; log_not_found off; access_log off; } ## don't log robots.txt requests. location = /robots.txt { allow all; log_not_found off; access_log off; } ## try the requested uri as files before handling it to php. location / { ## regular php processing. location ~ \.php$ { try_files $uri =404; fastcgi_pass php_processes; fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_name; include fastcgi_params; } ## static files location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf)$ { expires max; log_not_found off; ## no need to bleed constant updates. send the all shebang in one ## fell swoop. tcp_nodelay off; ## set the os file cache. open_file_cache max=1000 inactive=120s; open_file_cache_valid 45s; open_file_cache_min_uses 2; open_file_cache_errors off; } ## keep a tab on the 'big' static files. location ~* ^.+\.(?:ogg|pdf|pptx?)$ { expires 30d; ## no need to bleed constant updates. send the all shebang in one ## fell swoop. tcp_nodelay off; } } # / location}

root应该是网站根目录吧,然后访问了
你的name是m.test.com
你请求www.test.com ?
你ping一下 m.test.com 有没有回显127.0.0.*
还有,你/etc/hosts重写了么?
其它类似信息

推荐信息