Table of Contents
Wampserver2.5配置虚拟主机出现403 Forbidden解决办法,wampserver403
新配置的虚拟主机,web访问时提示403错误怎处理?可可以的原因是什?
Apache虚拟主机配置,访问时403
Home php教程 php手册 Wampserver2.5配置虚拟主机出现403 Forbidden解决办法,wampserver403

Wampserver2.5配置虚拟主机出现403 Forbidden解决办法,wampserver403

Jun 13, 2016 am 09:26 AM
virtual host

Wampserver2.5配置虚拟主机出现403 Forbidden解决办法,wampserver403

一直在用APMServ5.2.6,mysql好办,可以用mariadb代替进行升级,但php升级到5.4.7就没办法再升级,安装加速器也困难。就想迁移到Wampserver上来,以前也尝试过Wampserver,但配置很麻烦。

这一次是不得不配置了,安装一切很顺利,默认站点也正常运行。但配置虚拟主机时问题来了,总是提示:

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

一、在国内网站上能搜索到的资料就是下面这些:

启用httpd-vhosts.conf配置文件

Include conf/extra/httpd-vhosts.conf

2、修改httpd-vhosts.conf,加入类似下面内容:

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.修改hosts文件

127.0.0.1 www.sitename.com

 

尝试N回,浪费N多时间,根本没用。

 

二、没办法,只好换个上不了的搜索引擎,看E文,E文水平虽然不高,但还是看得懂的。

E文上,主要提到两点:

尝试启用,重启Apache后,情况没变,还是403错误。

测试成功,问题解决。

 

三、总结

原因在于apache配置文件的语法变了。因为看到apache就头疼,内容太多,太复杂,所以也就懒得看官方最新的文档了,而国内翻译的版本也滞后,所以这个问题才会出现找不到答案的情况。

希望这一篇博文能为受同样问题困扰的朋友带来一点帮助,不再为百x搜出来的那些没用的东西浪费时间。

 

除非注明,ffsystem文章均为原创,转载请以链接形式标明本文地址

本文地址:http://www.cnblogs.com/ffsystem/p/3950686.html

新配置的虚拟主机,web访问时提示403错误怎处理?可可以的原因是什?

显示上面的错误可能会有以下几个原因:
A、根目录下没有首页文件,如果你已上传好文件,那你的首页文件可能在其他文件夹下,位置不对。
B、文件格式不对,如果你购买的空间只支持ASP或html、htm,不支持PHP,那么你上传PHP的文件,肯定也不能访问。
 

Apache虚拟主机配置,访问时403

403是权限错误
 

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to set the speed limit of the virtual host through the Pagoda panel How to set the speed limit of the virtual host through the Pagoda panel Jun 21, 2023 am 11:17 AM

Pagoda Panel is a very excellent server management panel under Linux system. It has powerful functions and friendly interface, which can help users manage servers easily. In the process of using the Pagoda Panel, it is sometimes necessary to limit the speed of the virtual host to ensure the stability and fluency of the server. This article will introduce how to set the speed limit of the virtual host through the Pagoda panel to achieve a good user experience. 1. Overview of Speed ​​Limit Speed ​​limit refers to limiting the host bandwidth and ensuring the normal operation of the server by controlling the host traffic. exist

Detailed explanation of the virtual host and domain name binding functions of the Gin framework Detailed explanation of the virtual host and domain name binding functions of the Gin framework Jun 22, 2023 am 09:10 AM

The Gin framework is a lightweight web framework that provides the basic functionality needed to quickly build web applications. The Gin framework is flexible, efficient, and scalable, so it is widely used in the Internet field. Among them, the virtual host and domain name binding functions of the Gin framework are important features that other web frameworks do not have. This article will introduce this function in detail. 1. What is a virtual host? A virtual host creates multiple independent and mutually isolated virtual hosts on a physical host. Each virtual host has its own unique

What are the free php virtual hosts abroad? What are the free php virtual hosts abroad? Oct 16, 2023 am 09:57 AM

Foreign free php virtual hosts include DreamHost, Bluehost, Hostinger, 000Webhost, FreeHostia, Zymic, ByetHost and SiteGround.

How to use Pagoda Panel for virtual host security protection How to use Pagoda Panel for virtual host security protection Jun 21, 2023 pm 05:37 PM

In the Internet age, web hosting is a very popular service that allows users to own their own website and manage it easily. However, when using virtual hosts, security issues must also attract our attention. In response to this situation, Pagoda Panel provides a good solution that can help us better protect the security of the virtual host. This article will introduce how to use the Pagoda panel to protect the security of virtual hosts. 1. Set the login password and port. Before using the Pagoda panel, the first step is to set a secure login password. default

How PHP connects to Tencent Cloud Server ECS to implement cloud virtual host deployment How PHP connects to Tencent Cloud Server ECS to implement cloud virtual host deployment Jul 07, 2023 am 10:07 AM

How PHP connects to Tencent Cloud Server ECS to implement cloud virtual host deployment Introduction: With the rapid development of cloud computing, more and more enterprises and developers choose to deploy applications to cloud servers to obtain better elasticity and security. and scalability. This article will introduce how to use PHP to connect with Tencent Cloud Server ECS (Elastic Compute Service) to implement cloud virtual host deployment. Step 1: Create a Tencent Cloud Server ECS instance. First, we need to

How Nginx implements domain name-based virtual host configuration How Nginx implements domain name-based virtual host configuration Nov 08, 2023 pm 08:05 PM

How Nginx implements domain name-based virtual host configuration requires specific code examples. Nginx is a high-performance HTTP and reverse proxy server that provides flexible configuration options to implement domain name-based virtual host configuration. In this article, we will introduce in detail how to configure Nginx to implement domain name-based virtual hosting and provide specific code examples. First, we need to add the virtual host configuration block to the Nginx configuration file. On Ubuntu systems, the default configuration file path is /et

Nginx virtual host optimization configuration to improve website performance and user experience Nginx virtual host optimization configuration to improve website performance and user experience Jul 04, 2023 pm 05:55 PM

Nginx virtual host optimization configuration to improve website performance and user experience Introduction: Nowadays, with the continuous development of the Internet, the number of visits to the website is also increasing. As the entrance to the website, the optimized configuration of Nginx plays a crucial role in improving website performance and user experience. This article will introduce some methods for optimizing the configuration of Nginx virtual hosts, along with code examples so that you can better understand and apply them. 1. Configuration of virtual host Virtual host is an important concept in Nginx. Through the configuration of virtual host, we can

How to use Nginx to implement virtual host configuration based on domain name and path How to use Nginx to implement virtual host configuration based on domain name and path Aug 02, 2023 pm 01:14 PM

How to use Nginx to implement virtual host configuration based on domain name and path Introduction: In network application development, it is often necessary to configure multiple virtual hosts to provide different services. Nginx is a high-performance HTTP and reverse proxy server. By using Nginx, we can easily implement virtual host configuration based on domain name and path. This article will introduce how to use Nginx to implement such a configuration and give corresponding code examples. 1. The virtual host based on the domain name is configured in the Nginx configuration file, using

See all articles