Different domain names can point to the same project

Source: Internet
Author: User

  server{Listen 80;        server_name www.hello.com;        Index index.html index.htm index.php admin.php;        Root/home/wwwroot/default/dexin/dragon/public;        #error_page 404/404.html;        #include enable-php.conf;        Include enable-php-pathinfo.conf;            Location/nginx_status {stub_status on;        Access_log off; } location ~. *\.        (gif|jpg|jpeg|png|bmp|swf) $ {expires 30d; } location ~. *\.        (JS|CSS)? $ {Expires 12h;        } location ~/\.        {Deny All;            } location/{if (!-e $request _filename) {rewrite ^ (. *) $/index.php?s=/$1 last; }} Access_log/home/wwwlogs/access.log;}  
server{        listen 80;        server_name www.world.com;        index index.html index.htm index.php admin.php;        root  /home/wwwroot/default/dexin/dragon/public;        #error_page   404   /404.html;        #include enable-php.conf;        include enable-php-pathinfo.conf;        location /nginx_status        {            stub_status on;            access_log   off;        }        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$        {            expires      30d;        }        location ~ .*\.(js|css)?$        {            expires      12h;        }        location ~ /\.        {            deny all;        }    location / {            if (!-e $request_filename) {                rewrite  ^(.*)$  /index.php?s=/$1  last;            }        }        access_log  /home/wwwlogs/access.log;}

It is proven that all two domains can access the same resource.
www.hello.com
www.world.com

Different domain names can point to the same project

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.