Apache Configuration Multi-port multiple virtual host LAN Access sample _linux

Source: Internet
Author: User
First, in the \wamp\bin\apache\apache2.4.4\conf\extra\httpd-vhosts.conf modified as follows
Copy Code code as follows:

Namevirtualhost *:80

<virtualhost *:80>
DocumentRoot "E:/WEBSITE/PXSJ"
ServerName host7.com
Serveralias 192.168.1.116
<directory "E:/WEBSITE/PXSJ" >
Options Indexes FollowSymLinks
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>

Namevirtualhost *:8080

<virtualhost *:8080>
DocumentRoot "E:/WEBSITE/WHSJ"
ServerName host10.com:8080
Serveralias 192.168.1.116:8080
<directory "E:/WEBSITE/WHSJ" >
Options Indexes FollowSymLinks
AllowOverride None
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>

Second, the \wamp\bin\apache\apache2.4.4\conf\httpd.conf modified as follows:

Find the word "Listen" in this file to modify
Copy Code code as follows:

Listen 80
Listen 8080

# Virtual Hosts
# Include conf/extra/httpd-vhosts.conf to remove the front # so that the Httpd-vhosts virtual host file is turned on. It's time to restart the environment

Third, C:\Windows\System32\drivers\etc\hosts modify configuration
Copy Code code as follows:

<pre code_snippet_id= "331423" snippet_file_name= "blog_20140507_1_9705788" ></pre>
<pre></pre>
<pre></pre>
<pre></pre>

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.