Windows environment Configuration Apache+php+mysql development environment

Source: Internet
Author: User

Software Required: XAMPP 2.5

After downloading a dummy installation, it is recommended to change the installation directory to a disk other than the C disk (the default site directory and MySQL data are in the installation directory)

I am here to install in D disk (D:/XAMPP)

After installation, open and start the Apache and MySQL services

Enter http://localhost in the browser, do not accidentally will see it works, then congratulations on your installation success

The above are the clouds, the following is the focus:

1. Confirm that Apache is opening the virtual host

Open d:/xampp/apache/conf/httpd.conf

Find include "conf/extra/httpd-vhosts.conf" confirmation before # has been removed

2. Set up multiple virtual hosts

Open d:/xampp/apache/conf/extra/httpd-vhosts.conf

Find Namevirtualhost *:80 confirm that the # in front is removed, or removed #

Copy the following code to the last line

The code is as follows Copy Code
<virtualhost *:80>
# #ServerAdmin Postmaster@dummy-host2.localhost
DocumentRoot "/xampp/htdocs/develop"
ServerName develop.rin.com
# #ServerAlias Www.dummy-host2.localhost
# #ErrorLog ' Logs/dummy-host2.localhost-error.log '
# #CustomLog "Logs/dummy-host2.localhost-access.log" combined
</VirtualHost>

If you want to open another virtual host, then copy one to the last line, for example:

The code is as follows Copy Code
<virtualhost *:80>
# #ServerAdmin Postmaster@dummy-host2.localhost
DocumentRoot "/XAMPP/HTDOCS/DEVELOP2"
ServerName develop2.rin.com
# #ServerAlias Www.dummy-host2.localhost
# #ErrorLog ' Logs/dummy-host2.localhost-error.log '
# #CustomLog "Logs/dummy-host2.localhost-access.log" combined
</VirtualHost>

Remember to save.

3. In the default and directory to create a new corresponding site directory, and put index.html (test)

Create D:/xampp/htdocs/develop

Create D:/xampp/htdocs/develop2

Remember to put in index.html (test)

4. Modify the host file (do domain name resolution)

Open C:/windows/system32/drivers/etc/hosts (Notepad opens)

Add the following two lines:

The code is as follows Copy Code

127.0.0.1 develop.rin.com

127.0.0.1 develop2.rin.com

5. Restart Apache

End of 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.