Home > Backend Development > PHP Tutorial > Solution to 403 Forbidden when configuring virtual host in Wampserver2.5, wampserver403_PHP tutorial

Solution to 403 Forbidden when configuring virtual host in Wampserver2.5, wampserver403_PHP tutorial

WBOY
Release: 2016-07-13 10:19:44
Original
1168 people have browsed it

Wampserver2.5 configuration virtual host appears 403 Forbidden solution, wampserver403

has been using APMServ5.2.6, mysql is easy to handle, you can use mariadb instead for upgrade, but After upgrading PHP to 5.4.7, there is no way to upgrade it, and it is also difficult to install an accelerator. I just want to migrate to Wampserver. I have tried Wampserver before, but the configuration is very troublesome.

This time I had to configure it. The installation went smoothly and the default site also ran normally. But a problem arises when configuring a virtual host. It always prompts:

Forbidden
You 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

1. The information that can be searched on domestic websites is the following:

Enable httpd-vhosts.conf configuration file

Include conf/extra/httpd-vhosts.conf

2. Modify httpd-vhosts.conf and add content similar to the following:

ServerAdmin admin@localhost.com

DocumentRoot "D:/path/foldername"

ServerName www.sitename.com

ServerAlias ​​www.sitename.com

ErrorLog "logs/sitename.log"

CustomLog "logs/ sitename.log" common

Options FollowSymLinks

AllowOverride None

Order deny,allow

Allow from all

3. Modify hosts file

127.0.0.1 www.sitename.com

I tried N times and wasted a lot of time, but it’s useless.

2. I have no choice but to change to a search engine that cannot be accessed and read the E-text. Although the level of E-text is not high, I can still understand it.

E article mainly mentions two points:

I tried to enable it and after restarting Apache, the situation has not changed and the 403 error is still there.

The test was successful and the problem was solved.

3. Summary

The reason is that the syntax of the apache configuration file has changed. Because I have a headache when I see apache, there are too many contents and it is too complicated, so I am too lazy to read the latest official documents, and the domestic translation version is also lagging behind, so I can't find the answer to this question.

I hope this blog post can bring some help to friends who are troubled by the same problem and stop wasting time on useless things searched by Baix.

Unless otherwise noted, all ffsystem articles are original. Please indicate the article address in the form of a link when reprinting

This article address: http://www.cnblogs.com/ffsystem/p/3950686.html

How to deal with the 403 error when accessing the web for a newly configured virtual host? What is the reason for cocoa?

The above error may be displayed for the following reasons:
A. There is no homepage file in the root directory. If you have uploaded the file, your homepage file may be in another folder and the location is wrong.
B. The file format is incorrect. If the space you purchased only supports ASP, html, or htm, but not PHP, then the PHP file you upload will definitely not be accessible.

Apache virtual host configuration, 403 when accessed

403 is permission error

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/872757.htmlTechArticleWampserver2.5 configuration virtual host appears 403 Forbidden solution, wampserver403 has been using APMServ5.2.6, mysql is easy to handle, You can use mariadb instead to upgrade, but php will not work when you upgrade to 5.4.7...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template