Access vhost config website in another PC

may I ask question about the Apache Virtual Host config?

I use XAMPP, my develop app is WordPress.

Read More

I have configured my host file (C:WindowsSystem32driversetc…) like

127.0.0.1 tommydo.dev
127.0.0.1 172.25.129.113/tommydo.dev <== *172.25.129.113 is my local PC's IP address*

and C:xamppapacheconfextra**httpd-vhosts.conf** like:

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs/tommydo.dev"
    ServerName tommydo.dev
</VirtualHost>

It was successful when I access from my PC (LAN). With URL: http://tommydo.dev

But when I access from another computer using http://172.25.129.113/tommydo.dev is was broken. Of course ! Because of my WordPress config is “tommydo.dev” only.

My question is: Is it possible to configure or access from another PC to my WP in localhost in my own PC?

Related posts

1 comment

    1. Get Apache to listen to 172.25.129.113 on port 80. Use the following to listen to Port 80 on all interfaces

      Listen 80

    2. On the other computer try going to http://172.25.129.113

    3. You could end up with 404 errors with the path http://tommydo.dev.
      This could be solved by

      • Reconfiguring the site to use http://172.25.129.113
      • Adding the below to each Computer’s hosts file

        172.25.129.113                 tommydo.dev

      • Setup a DNS system in your LAN to have tommydo.dev as a Domain Name.

    Also

    127.0.0.1 172.25.129.113/tommydo.dev

    is invalid because the second part is not a hostname

Comments are closed.