【Wamp】Installation| Device access in LAN

Installation tutorial:
https://wampserver.site/article/1.html

download

https://www.wampserver.com/en/

insert image description here
There cannot be Chinese on the installation path

After installation, the icon turns green
insert image description here

put in web file

Place the webpage files in the www subfolder of the wamp folder

For example:\Wamp\program\www

insert image description here
insert image description here

modify http port

WAMP server uses port 80 by default, if you want to change this port (for example to 8080), please follow the steps below:

  1. Open the WAMP server and click on the systray icon.
  2. Then select "Apache" -> "httpd.conf". This will open the httpd.conf file in Notepad, where you can change Apache settings.
  3. In the httpd.conf file, look for lines like "Listen 80" or "Listen 0.0.0.0:80". This is the port your Apache server is currently listening on.
  4. Change "80" to your desired port number, eg "8080". So the result should look like "Listen 8080" or "Listen 0.0.0.0:8080".
  5. Save and close the httpd.conf file.
  6. Restart the WAMP server for the changes to take effect.

If the modification is successful, now when you visit your site in the browser, you need to add the new port number after the address, for example: "http://localhost:8080".

Note that some ports may already be used by other services, so if the new port doesn't work, try another port.

Device access in LAN

(1) Modify httpd.conf and httpd-vhost.conf
Main reference: https://blog.csdn.net/banana960531/article/details/82793950
Other references:
https://www.jianshu.com/p/d431a845e5cb

① Modify the httpd-vhost.conf file
The effective httpd-vhost.conf file is in:
D:\Academic\Wamp\program\bin\apache\apache2.4.54.2\conf\extra

You can also click on the wamp icon in the lower right corner and use Notepad to edit the httpd-vhost.conf file:
insert image description here
Change Require localto Require all granted(allow all devices to access)
insert image description here

② Modify the httpd.conf file

The effective httpd.conf file is in:
D:\Academic\Wamp\program\bin\apache\apache2.4.54.2\conf You
can also click the wamp icon in the lower right corner and use Notepad to edit the httpd.conf file:
insert image description here
put all Require all deniedand Require localChange all of them Require all granted
(even if it is not allowed to be changed in the note, we have to change it!!!)
insert image description here

(2) Change firewall settings
Reference: https://www.jianshu.com/p/d431a845e5cb

insert image description here
insert image description here
insert image description here
insert image description here

Enter ipconfig on the cmd command line and
insert image description here
the local area network IP is 192.168.4.196

(3) The device accesses the webpage

The other devices and this PC are connected to the same WiFi, just visit 192.168.4.196.

Guess you like

Origin blog.csdn.net/qq_39441603/article/details/132239245