I'm running a local Apache server with no access outside my network. I want to be able to navigate to sites by the server name.
For example, where hostname
is my server's hostname and home.lan
is my local domain,
- I CAN access Nextcloud using the alias via
https://hostname.home.lan/nextcloud
- I CANNOT access Nextcloud using the server name via
https://nextcloud.hostname.home.lan
What's wrong with my virtual host setup below?
<IfModule mod_alias.c>
Alias /nextcloud /usr/share/webapps/nextcloud/
</IfModule>
...
<VirtualHost *:443>
DocumentRoot /usr/share/webapps/nextcloud
ServerName nextcloud.hostname.home.lan
...
</VirtualHost>
hostname.home.lan
, I assume this is resolved in the router. And if I try to reachnextcloud.hostname.home.lan
is the whole thing resolved in the router? In that case, I would need to update the router DNS to point the Nextcloud FQDN to the same hostname as the other FQDN.