Apache2 (phpstudy) cannot be started on the local calculator in Windows)

Source: Internet
Author: User

After Baidu, the httpd. conf file in \ phpStudy \ Apache2 \ conf \ is prompted to be modified. The Code is as follows:

Copy codeThe Code is as follows: <VirtualHost *: 80>
ServerAdmin webmaster@163.com
DocumentRoot "D: \ www"
ServerName ymywz.com
Options Indexes FollowSymLinks
AllowOverride All
Order allow, deny
Allow from all
</VirtualHost>

Note: Due to code conflicts, please change the above double book name number to a single book name number

After you add the above Code at the bottom of the httpd. conf file and restart Apache, the following message is displayed:

Windows cannot start Apache2. For more information, see System Event Logs. If this is a non-Microsoft Service, contact the service provider and refer to service error code 1.
I thought it was a computer problem and I re-installed phpstudy. Apache can be started after the installation is re-installed, but this problem occurs again after the above Code is re-added. At this point, I think there is a problem with the added code. After I deleted a manual reboot, I found that:

After deleting the code "AllowOverride All", Apache can restart and the domain name is opened. I have not studied the usage of this Code. I only know that it can be used after deletion ······

Phpstudy local virtual host with multiple domain names

After starting Apache2, another problem occurs: the multi-site cannot be opened and the error 403 is displayed.

I checked against a line of uncommented code in the httpd. conf file. After checking and comparing with online tutorials, we found a problem:

# Include conf/extra/httpd-vhosts.conf the annotator "#" in front of this Code is not deleted. The purpose of this Code is to enable the httpd-vhosts VM file. After this step is completed, restart Apache to completely open the local domain names.

Note: After modifying the httpd. conf file, you also need to modify the hosts file to add a local virtual domain name (the principle is to resolve the domain name dns to the IP address in the space ).

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.