Hi folks,
EDIT: For clarity, I replaced posts 1 & 2
I have Virtualmin setup with a server titled “mydomain.com”. I allowed it to create a website during the setup process and it has created the folder “/home/{username}/public_html” for serving content to Apache. I have popped a “Hello World” HTML file in here for testing
Here’s what I’m seeing…
If I browse to “mydomain.com” - it stays on the naked domain and opens Hello World
If I browse to"www.mydomain.com" - it keeps “www” in the URL and opens the same and opens Hello World
If I look in Webmin > Servers > Apache Webserver, I have the following: https://i.imgur.com/wiUSmA3.png
I was a little confused about the two default Apache entries in the image as it was serving the Apache config page until I reloaded. The three Apache entries in the image above remain but it now loads “Hello World” for naked and “www” requests
While I haven’t specifically created a “www” sub-domain or server, considering I can browse to it, how would I go making this “www” sub-domain the primary in Apache as in re-directing requests to the naked domain to “www”… keeping in mind that I will be activating Lets Encrypt afterwards and forcing HTTPS
Also, is there any further configuration needed on the default Apache stuff? I don’t want the Apache config page appearing again and I’d like to clear out any old directorys which were previously serving content
Cheers,
Conor