Apache default site and listening on localhost

1 post / 0 new
#1 Fri, 09/29/2017 - 16:49
eddieb

Apache default site and listening on localhost

in an up to date ubuntu/webmin/virtualmin i have site A set as default in virtualmin settings.

the conf file for this site begins with < VirtualHost my.public.ip.address:80 >

for this reason this site was not the site being returned when i did "curl http://127.0.0.1"

so i changed the conf to read < VirtualHost *:80 >

and now "curl http://127.0.0.1" works properly.

i had to do this because letsencrypt writes the file to http://siteA.com/.well-known/acme-challenge/Tv_7KYxf7P5ltsp0k8qzXkxxxxxx... and when it curls http://127.0.0.1/.well-known/acme-challenge/Tv_7KYxf7P5ltsp0k8qzXkxxxxxx... it can't obviously find the file.

so let's encrypt works now. i am fine with this setup. but why did i have to change this? letsencrypt should write to /var/www, no?

TIA