First PHP development environment setup and multi-site configuration (Windows 7-based system)

Source: Internet
Author: User

Starting today, I will use PHP to develop some small sites, you know the advantages of the lamp (Linux) combination, so that PHP by the majority of small and medium-sized enterprises like. To make PHP and java,asp three points, PHP has a cross-platform, so it can be installed in the same way as Windows. PHP development tools, where the use of XAMPP software package is recommended (the reason is familiar, useful and timely update).

1: First download the xampp,:https://www.apachefriends.org/download.html. (Note that this document is installed and explained using version 1.8.3)

2: Install the steps do not need to say, is the installation of XAMPP should be noted when the start of MySQL, Apache, Filezilla, in order to install the line. After successful installation, launch Apache and MySQL.

3: At this time, in the browser input http://localhost, you should see the following words, indicating that the installation was successful.

"Welcome to XAMPP for windows!

Congratulations to you:
You have successfully installed the xampp!
"

By default, the XAMPP software is installed in "C:\xampp", the site Default path: "C:\xampp\htdocs". In general, there is nothing wrong with deploying your own programs directly under the default path. But if the Windows system hangs up, when the system is re-installed, the system disk will be formatted, and the C drive data will be erased. It is therefore not recommended to see local sites deployed on the C drive.

Let's talk about deploying the site to a non-system disk.

First Step: httpd.conf file ( C:\xampp\apache\conf\httpd.conf) then found in the file:

<directory/>
allowoverride None
Require all denied
</Directory>

......

<files ". ht*" >
Require all denied
</Files>

Change the denied in the above two Require all denied to granted

Step Two: find httpd-vhosts.conf in the Extra folder (introduced in the first step)

In the bottom of the example, the following 2 items are required, others can be added according to their own needs:

<virtualhost *:80>
DocumentRoot "F:/lianxi"
ServerName 127.0.0.3
</VirtualHost>

The third step: restart Apache, with 127.0.0.3 can access the contents of the Lianxi folder, such as the need to increase the site, in accordance with the above format, change the path "Lianxi" folder and address.

Tip: If you modify the httpd-vhosts.conf configuration file to cause Apache to fail to boot, it may be difficult to find the cause of the problem from the software or logs. This time, you can go to the C:\xampp\apache\bin path, with the command to start Httpd.exe, you can see the specific configuration errors, in order to find and modify the problem.

First PHP development environment setup and multi-site configuration (Windows 7-based system)

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.