m.test.com을 구성하고 싶습니다
<code>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 } </code>
Root는 웹사이트의 루트디렉토리여야 하는데, 그래서 방문했습니다
m.test.com을 구성하고 싶습니다
<code>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 } </code>
Root는 웹사이트의 루트디렉토리여야 하는데, 그래서 방문했습니다
당신의 이름은 m.test.com
www.test.com을 요청하셨나요?
m.test.com을 핑하여 127.0.0.*을 반환하는지 확인하세요.
또한 /etc/hosts를 다시 작성하셨나요?