A standalone server is one that can build multiple websites, an IP address, a port

Source: Internet
Author: User

# 1, if you open the virtual host, this must have (IP: port), found #NameVirtualHost *:80 modified to: Namevirtualhost 127.0.0.1:80 # 2, modify <directory "/var/www/html "> Change to <directory"/var/www "> # 3, add site # Default trap host, prohibit illegal binding, create a new nosite directory under the WWW directory <virtualhost 127.0.0.1:80> D    Ocumentroot/var/www/nosite ServerName 127.0.0.1 <location/> Order allow,deny Deny from all </Location></VirtualHost> # huanhang.com<virtualhost 127.0.0.1:80> documentroot/var/www/ huanhang.com ServerName www.huanhang.com serveralias huanhang.com www.huanhang.com <directory "/var/www/huanha    Ng.com "> Options-indexes followsymlinks allowoverride all Order Allow,deny </Directory> errorlog "/log/httpd/huanhang.com-error.log" Customlog "/log/httpd/access/huanhang.com-access. Log "Common</virtualhost> # blog.huanhang.com<virtualhost 127.0.0.1:80> documentroot/var/www/ Blog.huanhang.com ServerName blog.huanhang.com   Serveralias blog.huanhang.com <directory "/var/www/blog.huanhang.com" > Options-indexes followsymlinks allowoverride all Order allow,deny allow from all </Directory> errorlog "/log/httpd/blog. Huanhang.com-error.log "Customlog"/log/httpd/access/blog.huanhang.com-access.log "Common</VirtualHost> # 4, restart apache# now access: Huanhang.com and blog.huanhang.com will show different content. # Note: # Please replace the above 127.0.0.1 with your server's IP, and other corresponding to replace it with your own.

  

A standalone server is one that can build multiple websites, an IP address, a port

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.