Rumah  >  Artikel  >  pembangunan bahagian belakang  >  在服务器上部署了一个php项目 不能通过域名访问该服务器 出现403

在服务器上部署了一个php项目 不能通过域名访问该服务器 出现403

WBOY
WBOYasal
2016-06-06 20:28:252229semak imbas

windows server 2008系统 wampserver集成环境
绑定域名用的是这个方法:
启动wamp开打httpd.conf找到Include conf/extra/httpd-mpm.conf把前面的#号去掉。

在找到D:wampbinapacheApache2.4.4confextra目录下的httpd-vhosts.conf文件

里面有事例。按照事例写我们自己的

<code>ServerAdmin admin@xxx.com
DocumentRoot "D:/wamp/www/xxx.com"
ServerName www.xxx.com
ErrorLog "logs/www.xxx.com-error.log"
CustomLog "logs/www.xxx.com-access.log" common</code>

打开host文件,写入 127.0.0.1 www.xxx.com

回复内容:

windows server 2008系统 wampserver集成环境
绑定域名用的是这个方法:
启动wamp开打httpd.conf找到Include conf/extra/httpd-mpm.conf把前面的#号去掉。

在找到D:wampbinapacheApache2.4.4confextra目录下的httpd-vhosts.conf文件

里面有事例。按照事例写我们自己的

<code>ServerAdmin admin@xxx.com
DocumentRoot "D:/wamp/www/xxx.com"
ServerName www.xxx.com
ErrorLog "logs/www.xxx.com-error.log"
CustomLog "logs/www.xxx.com-access.log" common</code>

打开host文件,写入 127.0.0.1 www.xxx.com

检查权限,检查目录是否正确

一般403 forbidden的问题,你要检查apache conf文件。
尤其是在

Order Deny,Allow
Allow from all
Require all granted

这种地方,你要尤其注意。
至于具体含义,你自己去搜索资料。一般403都是由于对目录的配置不恰当造成的。
祝一切顺利。

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn