Hi, I am quite familiar with hosting multiple domains on a single server using 
apache virtual hosts.
I rent a web server and am running 16 domains (currently) for myself, family 
and friends.

Now I need to host some internal only websites for my employer (employees get 
free wifi in the cafeteria) to pass on information to the employees.

I have setup a virtual debian 10 server with apache installed.
I have a PC functioning as a router (192.168.1.1/24) using the x86 version of 
DD-WRT, and have added the various hostnames to DNSMasq (i.e. I can now 
nslookup "daily", "jobs", "deals" and they all resolve to the same ip 
192.168.250.1-as long as I put a dot after e.g. daily., or jobs.)

Using the default 000-default.conf file included in sites-available and 
sites-enabled as-is, I am able to reach my webserver using any of those names, 
and see my current index.html file.

I have tried to modify the conf file as follows. (I removed all the commented 
out lines)

<VirtualHost jobs:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
</VirtualHost>
<VirtualHost daily:80>
    ServerName daily
    ServerAlias www.daily<http://www.daily>
    DocumentRoot /var/www/html/daily
</VirtualHost>
<VirtualHost deals:80>
    ServerName deals
    ServerAlias www.deals<http://www.deals>
    DocumentRoot  /var/www/html/deals
</VirtualHost>

I know this would work if I was trying to go to say http://today.jobs or 
http://monthly.deals i.e. using a TLD and hosting from the internet

Ultimately I would like a separate webpage for each name i.e.  http://jobs, 
http://daily, http://deals

I know I can accomplish this if I set up a webserver for each name, but that 
seems like a waste.

All the internet searches show me how to do this with internet facing TLD's.
Is it even possible to do this internally?
Do I need to create a dummy domain?

Any help will be greatly appreciated.





Reply via email to