wampserver 3.0.4 Same LAN Error: You don’t have permission to access /index.php on this server

It’s very normal for me to visit my host and my resources when I found that I was debugging with my colleagues today. I changed it

C:\Windows\System32\drivers\etc\hosts

xx.xx.xx.xx newjin1.com // xx.xx.xx.xx My LAN IP newjin1.com my configured domain name

But it does suggest that:

Youdon’thavepermissiontoaccess/ index.phponthisserver.
Apache/2.4.18(Win32)PHP/5.6.19Serverat newjin1.comPort80

According to the online search, it should be changed httpd.conf File, but my this is a virtual directory, multi domain ah, most of the Internet can not follow, to understand why change, change where

original virtual host configuration :

<VirtualHost *:80&>
ServerName newjin1.com
DocumentRoot D:\wamp\www\guanjin1\yiqifei\php
<Directory “D:\wamp\www\guanjin1\yiqifei\php”&>
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory&>
</VirtualHost&>

to change the virtual host configuration, the red words below are the places to change

<VirtualHost *:80&>
ServerName newjin1.com
DocumentRoot D:\wamp\www\guanjin1\yiqifei\php
<Directory “D:\wamp\www\guanjin1\yiqifei\php”&>
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
allow from all
</Directory&>
</VirtualHost&>

It’s OK after I change it. If it’s not OK after I change it, I can see other changes, such as httpd.conf Learn to draw inferences from one instance.

Similar Posts: