IIS, Apache, Tomcat server virtual host Configuration

Source: Internet
Author: User

First of all we have a domain name xxx.com; (Note that two first-level domain names may be different)
There are two levels of two domain names priject.xxx.com and movie.xxx.com
There is a host that now assumes access to the host computer

IIS Server Virtual Host configuration method
1. Add a Web site to IIS
Where the host name in the binding column is priject.xxx.com, the file path of the site is assigned well

2. Add an ISAPI filter
Where the executable file location is the installation location of PHP
3. Add script mappings, handler mappings
4, finally restart the IIS server, you can use the domain name to access the
Add the site again, the same steps.


Tomcat Server Virtual Host configuration method
Add host node under engine node

Unpackwars= "true" autodeploy= "true" >

<!--Singlesignon valve, share authentication between Web applications
Documentation at:/docs/config/valve.html--
<!--
<valve classname= "Org.apache.catalina.authenticator.SingleSignOn"/>
-

<!--Access log processes all example.
Documentation at:/docs/config/valve.html
Note:the pattern used is equivalent to using pattern= "common"-
<valve classname= "Org.apache.catalina.valves.AccessLogValve" directory= "Logs"
prefix= "Localhost_access_log" suffix= ". txt"
pattern= "%h%l%u%t &quot;%r&quot; %s%b "/>

</Host>
Unpackwars= "true" autodeploy= "true" >

<!--Singlesignon valve, share authentication between Web applications
Documentation at:/docs/config/valve.html--
<!--
<valve classname= "Org.apache.catalina.authenticator.SingleSignOn"/>
-

<!--Access log processes all example.
Documentation at:/docs/config/valve.html
Note:the pattern used is equivalent to using pattern= "common"-
<valve classname= "Org.apache.catalina.valves.AccessLogValve" directory= "Logs"
prefix= "Localhost_access_log" suffix= ". txt"
pattern= "%h%l%u%t &quot;%r&quot; %s%b "/>

</Host>
Note In the WebApps directory, movie to create the root directory, and root must be capitalized. Place the JSP code first in the root directory.

Tomcat automatically finds the appropriate directory to access according to the host name


Apache Server Virtual Host configuration method


Open httpd.conf File
Remove LoadModule vhost_alias_module modules/mod_vhost_alias.so
The # in front of this sentence
And
Include conf/extra/httpd-vhosts.conf the line in front of the # number

Include conf/extra/httpd-vhosts.conf This sentence at the bottom of the httpd.conf file

Then open the httpd-vhosts.conf file under Apache2.2\conf\extra, and add the following code

#配置自己的虚拟主机
<virtualhost *:80>
#网站目录, if the PHP directory under the WWW directory, the following #就填写F:/www/php
DocumentRoot "d:/www/Site Directory"
#域名
ServerName priject.xxx.com
#这里配置欢迎首页面
DirectoryIndex index.html index.htm index.php
<directory/>
Options FollowSymLinks
#不允许别人修改我们的页面
AllowOverride None
#设置访问权限
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>
<virtualhost *:80>
#网站目录, if the PHP directory under the WWW directory, the following #就填写F:/www/php
DocumentRoot "d:/www/Site Directory"
#域名
ServerName movie.xxx.com
#这里配置欢迎首页面
DirectoryIndex index.html index.htm index.php
<directory/>
Options FollowSymLinks
#不允许别人修改我们的页面
AllowOverride None
#设置访问权限
Order Allow,deny
Allow from all
</Directory>
</VirtualHost>

IIS, Apache, Tomcat server virtual host Configuration

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.