Welcome Guest. Please Login or Register  


You are here: Index > AMPPS > General Support > Topic : Redirected to AMPPS root from network client



Threaded Mode | Print  

 Redirected to AMPPS root from network client (2 Replies, Read 213 times)
rmanzie
Group: Member
Post Group: Newbie
Posts: 3
Status:
I have an AMPPS installation which works fine on my local PC for 'domain.test', with a functional webpage. I want to access the server from a laptop over Wifi and it connects through to AMPPS but instead of the webpage, I get redirected to a directory listing of the AMPPS root directory, with an AMPPS logo. The Apache log shows some entries with the IP address of the laptop, so it's seeing the requests.

Running latest version of AMPPS, re-downloaded today, on Windows 10. The Wifi Router is configured to return the PC's IP address for domain.test.

Any ideas?

Rod
IP: --   

Redirected to AMPPS root from network client
rmanzie
Group: Member
Post Group: Newbie
Posts: 3
Status:
After a bit more debugging, the Apache access.log shows an incoming request from the laptop for:

192.168.1.110 - - [06/Jul/2020:18:29:58 +0100] "GET / HTTP/1.1" 200 2839

If I request a specific URI, domain.test/index.html it just sees:

192.168.1.110 - - [06/Jul/2020:18:29:58 +0100] "GET /index.html HTTP/1.1" 200 2839


So it's not seeing the domain name requested in the incoming header, just a default request which, I guess, goes to the top of the www tree.

Any idea where that domain name is getting stripped out of the request?



IP: --   

Redirected to AMPPS root from network client
rmanzie
Group: Member
Post Group: Newbie
Posts: 3
Status:
Answer found here: httpd.apache.org/docs/2.4/vhosts/name-based.html

Default AMPPS behaviour on adding a domain is to put

<VirtualHost domain.name:80>
[...]
ServerName meadow.test

in the automatically generated httpd-vhosts.conf, whereas it needs to be:

<VirtualHost *:80>
[...]
ServerName meadow.test

Not sure how to make this happen automatically yet, but manual editing on the rare occasions I add a domain will be fine.



IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is August 10, 2020, 9:05 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 10  |  Page Created In:1.483