I have installed XAMPP and have an apache server running on my mac. When I go to the address http://192.168.1.132:80/testproject/test.php from the mac's browser it works (simply echos the word 'success'). When I go to the exact same address from another device on the network it says it cannot connect or similar.
I setup a virtual host, and if I replace the servername with my IP I get the same result (works from the mosting mac but not from other devices on network)
# localhost
<VirtualHost *:80>
ServerName localhost
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
<Directory "/Applications/XAMPP/xamppfiles/htdocs">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
# My custom host
<VirtualHost *:80>
ServerName wgaamwserver.local
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
<Directory "/Applications/XAMPP/xamppfiles/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
ErrorLog "logs/wgaamwserver.local-error_log"
</VirtualHost>
I have run "ps -eaf | grep httpd" in terminal while XAMPP was not running to check incase of other httpd services. I got the below output:
501 19343 18144 0 4:57pm ttys000 0:00.00 grep httpd
I have been searching everywhere for a solution to this but googling mostly turns up issues relating to either windows firewall on the host blocking the remote connections, or the apache server simply not responding when connecting from the host. Obviously neither are the case here.
localhost
can use only in your`s device, rename them
Try add in hosts file (At another device) 192.168.1.132 wgaamwserver.local
and go to wgaamwserver.local
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.