Appserv Configuring multi-site Access

Source: Internet
Author: User

These two days have been developed, but cheap rented two pit daddy space, alas, one is the version is too low, one is not created permission, is no language

There is no way to rent a space, but Providence play people, I set up the environment took two days to build the environment, the first time everyone wamp found Wamp in the inside incredibly not good, no way, it had to download a Appserv

But in the inside found that the modification method of Apache and Wamp inside the modification method incredibly different, tangled up the deadly

Helpless under I had to come to find degrees Niang, the results of those methods are almost no number of can be used, put me a good meal disgusting

No more nonsense.

Appserv Configuring multi-site Tutorials

First step: Download Appserv and install

I downloaded the appserv-win32-2.5.10 version, after downloading directly double-click and follow the prompts to install.

Step Two: Modify the Windows system Hosts file

My Appserv installation environment is windowsxp, why first to modify the Hosts file? This is because the installation and commissioning of Appserv is normally done on this machine, and when multiple sites are configured with Appserv, Domain name point is 127.0.0.1, you need to map different domain names, or even if the configuration is not accessible, unless you have a public IP, and through DNS mapping.

Locate the Windows\system32\drivers\etc\hosts file and open it, locate 127.0.0.1 localhost, and add the test site domain name that you want to map, such as:

127.0.0.1  Www.leapsoul.  CN127.0.0.1  www.phptest.cn

Save the Hosts file.

Strong>appserv Configuring multi-site Tutorials Step three: Modify the Apache configuration file to enable the virtual host configuration

Locate the apache2.2\conf directory in the Appserv installation directory, open the Apache configuration file httpd.conf, and find the # Virtual hosts

# Include conf/extra/httpd-vhosts.conf

# removal in.

Because the Apache configuration in the Appserv configuration is present in a custom manner, the above statement enables the virtual host configuration on behalf of Apache. At the same time, the Appserv multi-site configuration function is implemented as a virtual host, and you can combine the httpd configuration file

# LoadModule vhost_alias_module modules/mod_vhost_alias.so

#去除 (after my test, in fact, this Apache module plus does not load very much)

Strong>appserv Configuring the Multi-site tutorial Step Fourth: Modifying the Apache Virtual host configuration

Open the conf/extra/httpd-vhosts.conf configuration file, the file itself has two virtual host configuration records, as long as a slight modification.

ServerAdmin (e-mail address), DocumentRoot (Web root directory, I set the directory for "c:/appserv/www/wwwleapsoulcn/" and c:/appserv/www/wwwphptestcn/), The ServerName (site domain name information), Serveralias (site domain name alias) configuration options are set to the information you need to set. Appserv Configure multi-site instances as follows:

<virtualhost *:80>"c:/appserv/www/wwwleapsoulcn/"ServerName Leapsoul. Cnserveralias www. Leapsoul.  "Logs/dummy-host.x-error.log""Logs/dummy-host.x-access.log" common</virtualhost ><virtualhost *:80>"c:/appserv/www/wwwphptestcn/"ServerName www. phptest.  "Logs/dummy-host2.x-error.log""Logs/dummy-host2.x-access.log" common</ Virtualhost>

Strong>appserv Multi-site Configuration tip: If you are configuring multiple virtual hosts at the same time, make sure that the first virtual host record is not missing serveralias option, otherwise the configuration will not succeed.

Finally save the conf/extra/httpd-vhosts.conf configuration file.

When restarting Apache, be careful to restart Apache in cmd mode via the net start apache2.2 or net stop apache2.2 mode.

At this time through the IE domain name can be accessed using the Appserv configuration of multiple sites.

The above method is to use Appserv to configure the multi-site access function using the domain name method, if the IP is also possible to implement this configuration function, the difference is that different ports need to be used. In addition to the original above httpd.conf configuration, you need to Listen the statement, add the port to listen to, such as:

Listen 80808081

The <virtualhost *:80> in the conf/extra/httpd-vhosts.conf configuration file is then modified to <virtualhost corresponding IP: the corresponding listening port >, the other configuration is the same.

Finally, delete the configuration previously set in the Hosts file and restart the Apache service.

At this point, how to use the Appserv domain name or IP address to implement the configuration of multi-site access tutorial is finished.

This blog goes to: http://blog.csdn.net/chamtianjiao/article/details/9700633

Appserv Configuring multi-site access (RPM)

Related Article

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.