anonymoussc
Jan 19, 2016 • 1 min read

Connecting xampp / mampp localhost into another pc / laptop

Set up a virtual host:

Change the httpd-vhosts.conf, location of the file :

Add the following line at the end of the file :

<VirtualHost *:80>
    DocumentRoot "/Applications/MAMP/htdocs/"
    ServerName someName.whatever
</VirtualHost>

Configure your hosts file

Location of the file :

Add the following line at the end of the file :

127.0.0.1           someName.whatever

Access someName.whatever from an other computer

  1. Get the IP address of the computer hosting the website In the terminal, on MAC and LINUX type ifconfig |grep inet, on WINDOWS type ipconfig
  2. Edit the hosts file on the computer you are trying to access the website from. Refer to the Configure your hosts file section. Add the following line at the end of the file :
000.000.0.0         someName.whatever

Change the 000.000.0.0 into ip address value based on the IP address of the computer hosting the website.

Run sudo php artisan serve --host 127.0.0.1 --port 80 from artisan (laravel). Check at http://someName.whatever.


The library, with its Daedalian labyrinth, mysterious hush, and faintly ominous aroma of knowledge, has been replaced by the computer’s cheap glow, pesky chirp, and data spillage. - P. J. O’Rourke

Post by: Anonymoussc (@anonymoussc)