Nginx configures the virtual host and changes m.test.com to www.test.com.

Source: Internet
Author: User
Tags shebang
{Code...} failed to access m.test.com... The hosts file has no effect, and the ping operation has been modified.
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} 

After accessing m.test.com
Error... Ineffective


The hosts file has also been modified.
Ping is successful.

Reply content:
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} 

After accessing m.test.com
Error... Ineffective


The hosts file has also been modified.
Ping is successful.

In order to speed up access, the browser generally has dns cache. First, you try to completely exit the chrome browser and then try again.

If not, access chrome: // net-internals/# dns and click the following Button.

Did you go over the wall.
If it's over the wall. Then, try again after you leave the vpn.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.