Home > Backend Development > PHP Problem > What should I do if other machines on the LAN cannot access the PHP environment after setting up WAMP?

What should I do if other machines on the LAN cannot access the PHP environment after setting up WAMP?

coldplay.xixi
Release: 2023-03-05 15:56:02
Original
3192 people have browsed it

Solution to the problem that other machines on the LAN cannot be accessed after WAMP sets up a PHP environment: First, make sure the firewall is turned off and port 80 is not occupied; then modify the [httpd.conf] file of apache; and finally restart apache.

What should I do if other machines on the LAN cannot access the PHP environment after setting up WAMP?

[Related learning recommendations: php graphic tutorial]

Solution to the problem that other machines on the LAN cannot be accessed after WAMP sets up a PHP environment:

After just installing wamp, it can be accessed locally by accessing localhost or 127.0.0.1, but If other computers in the LAN access, a 403 error will occur. I searched a lot on the Internet and found various explanations, but few were useful. The solution to the problem is as follows:

1. First, make sure the firewall is turned off and port 80 is not occupied.

2. Modify the httpd.conf file of apache in two places:

The first

Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
Copy after login

is modified to:

Options FollowSymLinks
AllowOverride None
Order deny,allow
# Deny from all
Allow from all
#允许所有访问
Satisfy all
Copy after login

The second part

# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Copy after login

is modified to:

# onlineoffline tag - don't remove
Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
Allow from all
Copy after login

In addition, if you use DVWA, the above settings will not work because htaccess restricts access. After decompressing DVWA, place it in the home directory, and modify the rules in htaccess as follows:

order deny,allow
deny from none
allow from all
Copy after login

After modification, restart apache, and other machines in the LAN can access the DVWA platform built on this machine.

Related learning recommendations: php programming (video)

The above is the detailed content of What should I do if other machines on the LAN cannot access the PHP environment after setting up WAMP?. For more information, please follow other related articles on the PHP Chinese website!

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