I'm using XAMPP v3.2.4 and I don't know if this makes any difference but Joomla 3.9.14
In my local environment I access my Joomla site by visiting localhost/mysite
. I now want to have a sub domain localhost/apps.mysite
.
I've created a folder called apps
and placed this in my Joomla root directory, which is C:\xampp\htdocs\mysite\apps
. This folder contains a single index.html
file.
I've made the following changes;
In my Windows hosts
file I added the following line;
127.0.0.1 localhost/apps.mysite
In my httpd-vhosts.conf
file I added;
NameVirtualHost 127.0.0.1:80
<virtualhost *:80="">
DocumentRoot "C:/xampp/htdocs/mysite/apps"
ServerName localhost/apps.mysite
ServerAlias www.apps.mysite.localhost.com
</virtualhost>
I haven't made any other changes to config files. I've restarted Apache a few times, no change.
When I visit the URL http://localhost/apps.mysite
I see the following error;
Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.41 (Win64) OpenSSL/1.1.1c PHP/7.3.9
What do I need to change in order to access my subdomain at http://localhost/apps.mysite
NameVirtualHost 127.0.0.1:80
is not necessary and generates at least a warning as I remember – RiggsFolly<virtualhost *:80="">
I dont think the=""
should be there – RiggsFollylocalhost
in the name at all – RiggsFollylocalhost/apps.mysite
is not a proper subdomain - what are you really looking for? A subdomain could beapps.mysite
orapps.localhost
– Nico Haase