Wampserver2.5 Configure virtual host to appear 403 Forbidden processing scheme _linux

Source: Internet
Author: User

has been using apmserv5.2.6,mysql good, you can use MARIADB instead of upgrading, but the PHP upgrade to 5.4.7 can not upgrade, installation accelerator is also difficult. Want to migrate to wampserver up, have tried before wampserver, but the configuration is very troublesome.

This time is forced to configure, the installation of everything is smooth, the default site is also normal operation. However, the problem is when configuring the virtual host, always prompting:

Forbidden
don ' t have permission to access/on this server.
apache/2.4.9 (WIN32) php/5.5.12 Server at www.sitename.com Port 80

The information that can be searched on the domestic website is the following:

1. Modify the httpd.conf file

Enable httpd-vhosts.conf configuration file
Include conf/extra/httpd-vhosts.conf

2, modify the httpd-vhosts.conf, add similar to the following content:

<virtualhost *:80>
ServerAdmin admin@localhost.com
documentroot "D:/path/foldername"
ServerName www.sitename.com
serveralias www.sitename.com
ErrorLog "Logs/sitename.log"
Customlog Sitename.log "Common
<directory" D:/path/foldername ">
Options followsymlinks
allowoverride None Order
Deny,allow
Allow from all
</Directory>
</VirtualHost>

3. Modify the Hosts file

127.0.0.1 www.sitename.com

Try n back, waste n more time, no use at all.

Two, no way, had to change a search engine, read E, E-wen, although not high level, but still can understand.
E, the main reference to two points:

Enable Rewrite_moudle.

Attempt to enable, restart Apache, the situation has not changed, or 403 error.

To modify a sentence in the vhosts configuration file, this is the key:

Allow from all to Require all granted

The test is successful and the problem is solved.

Third, summary

The reason is that the syntax of the Apache configuration file has changed. Because see Apache headache, content too much, too complex, so also don't bother to read the official latest documents, and the domestic translation of the version is also lagging behind, so this problem will appear to find the answer.

Hopefully this blog post will help friends who are plagued by the same problems and no longer waste time on the useless things that are being searched for by hundred X.

-->
Original address: http://www.cnblogs.com/ffsystem/p/3950686.html

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.