I’ve been having trouble wrapping my head around what I need to do here at work so this will be my attempt to do so.
I have a server for my own usage where I have a WAMP server running, and I’ve figured out how to get it online and navigate to it. The goal is to make it Intranet only and I’ve found that as well I believe (first 3 parts of the IP in the required section in httpd.conf
file) and tested that. With that in mind I have 2 projects that I would like to host on there using the same IP address and then have them accessible by the host name from people within the company.
So if I name them projectA
and projectB
I have the two virtual hosts with servername projectA
and projectB
included in the httpd.conf file on the server. Also because of something we run at work I have it listening to port 8080 instead of port 80.
For short term testing I have my laptop with an entry in the hosts file mapping the IP address to the host name I’m going for, let’s call it hostC
.
What I would like to be able to do is access projectA
and projectB
on hostC
as a reasonable process by typing something like //hostC/projectA/projectA/fileA.php
into the search bar, but what I’ve seen shows server names as only something like www.projectA.com
which would then take it out from the host banner. So can I do what I want or am I thinking of it in the entirely wrong way?
My thoughts if what I’m doing is wrong are that either I would need to have two hosts mapped in my host file (will be represented in the company’s DNS server) and have it be more like //hostA/projectAindex.php
and //hostB/projectBindex.php
or just keep it as one host and provide a page which forks off to the two different projects like //hostA/projectAindex.php
and //hostA/projectBindex.php
. Does one of those make more sense?
I’ve read a lot about it, and gone through the Apache documentation I’m just not entirely sure what it means or how to think about it.