You want to configure the m.test.com
server {listen; # 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; # # 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 ~* ^.+\. (?: O Gg|pdf|pptx?) $ {Expires 30d; # # need to bleed constant updates. Send the All shebang in one # # Fell swoop. Tcp_nodelay off; }} #/location}
Root should be the root of the Web, and then access the
Reply content:
To configure the m.test.com
server {listen; # 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; # # 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 ~* ^.+\. (?: O Gg|pdf|pptx?) $ {Expires 30d; # # need to bleed constant updates. Send the All shebang in one # # Fell swoop. Tcp_nodelay off; }} #/location}
Root should be the root of the Web, and then access the
Your name ism.test.com
You asked for www.test.com?
Do you ping m.test.com back to show 127.0.0.*
Also, have you/etc/hosts rewrite it?