0

I am running XAMPP on NUC i7 windows 10 pro. Its IP address is a.b.c.d and has 4 applications in the htdocs folder named app1 (html5 + php form), app2 (drupal 7 based site), app3 (html5 site). I don't know how it is automatically re routing the traffic to these individual apps by just typing this on any device connected to the same network:

http://a.b.c.d/app1

http://a.b.c.d/app2

http://a.b.c.d/app3

Problem comes when I am adding another folder app4 for my wordpress installation. When I am on this machine locally, I can access the wordpress site by localhost/app4 but cannot access it from other clients on the network by typing http://a.b.c.d/app4 My browser converts the ip address into localhost/app4 which doesn't exist on my client machine.

I've modified my httpd.conf as:

#Virtual hosts
Include conf/extra/httpd-vhosts.conf

updated httpd-vhosts.conf file like:

NameVirtualHosts *:80    
<VirtualHost *:80>
        DocumentRoot "C:/xampp/htdocs/app4"
        ServerName app4.localhost
        ServerAlias www.dummy-host.localhost
        ErrorLog "logs/dummy-host.localhost-error.log"
        CustomLog "logs/dummy-host.localhost-access.log" combined
    </VirtualHost>

and added entries in my host file as

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost
127.0.0.1   localhost
127.0.0.1   app1
127.0.0.1   app2
127.0.0.1   app3
127.0.0.1   app4
127.0.0.1   app5

I've tried other examples googling around but nothing seems to be working. Even tried other SO examples like SO Example and other SO example

Am I heading in the wrong direction?

Zak
  • 6,976
  • 2
  • 26
  • 48
camelbrush
  • 236
  • 6
  • 16

1 Answers1

0

Wordpress is likely redirecting http://a.b.c.d/app4 to http://localhost/app4

Change the site url and site name in the wordpress install to app4.

It may also help you to do a hard reload or open in an incognito window (if you're using chrome) as a 301 redirect would be stored by the browser.

relytmcd
  • 234
  • 1
  • 9