Installation tutorial:
https://wampserver.site/article/1.html
download
https://www.wampserver.com/en/
There cannot be Chinese on the installation path
After installation, the icon turns green
put in web file
Place the webpage files in the www subfolder of the wamp folder
For example:\Wamp\program\www
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:
- Open the WAMP server and click on the systray icon.
- Then select "Apache" -> "httpd.conf". This will open the httpd.conf file in Notepad, where you can change Apache settings.
- 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.
- Change "80" to your desired port number, eg "8080". So the result should look like "Listen 8080" or "Listen 0.0.0.0:8080".
- Save and close the httpd.conf file.
- 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:
Change Require local
to Require all granted
(allow all devices to access)
② 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:
put all Require all denied
and Require local
Change all of them Require all granted
(even if it is not allowed to be changed in the note, we have to change it!!!)
(2) Change firewall settings
Reference: https://www.jianshu.com/p/d431a845e5cb
Enter ipconfig on the cmd command line and
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.