Networking Setup
Networking Setup
I got Centos running and several virtualboxes running on it.
Each virtualbox has its own internal IP address and has apache running each have their own virtualhost and domain setup. But whenever I got to any domain it does not go anywhere, what am I doing wrong?
Each virtualbox has its own internal IP address and has apache running each have their own virtualhost and domain setup. But whenever I got to any domain it does not go anywhere, what am I doing wrong?
Re: Networking Setup
on each virtual machine put ip and domain in /etc/hosts, like this ( 127.16.151.1 www.example.org ) so that machines can resolve the page
Re: Networking Setup
What if that particular server is supposed to have that domain should it just be then?
Code: Select all
127.0.0.1 example.com
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Networking Setup
You are not clear in what you want.
If you are referring to public domain names with public WAN access you have a problem.
Your single public IP address can only be forwarded to a single local IP per port.
If you are referring to local network machine names for local access only you need to configure your local DNS server or
use entries in /etc/hosts on each machine.
If you are referring to public domain names with public WAN access you have a problem.
Your single public IP address can only be forwarded to a single local IP per port.
If you are referring to local network machine names for local access only you need to configure your local DNS server or
use entries in /etc/hosts on each machine.
Re: Networking Setup
i suppose that you doing that for local network, just edit /etc/hosts (put ip from virtual machine and domain name)xarc wrote:What if that particular server is supposed to have that domain should it just bethen?Code: Select all
127.0.0.1 example.com
Re: Networking Setup
I have a physical server with one public IP address (WAN), I have several virtual servers running on that physical server with their own virtualhost such as example1.com example2.com
But the problem I am running into is that whenever I visit any of these domains see the same default apache page.
But the problem I am running into is that whenever I visit any of these domains see the same default apache page.
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Networking Setup
You can only forward that public IP address port 80 to a single virtual machine, so that is to be expected.
Read about httpd's virtual domains and put all your webnsites on one VM.
Read about httpd's virtual domains and put all your webnsites on one VM.
Re: Networking Setup
if u see apache default site, try comment all in /etc/httpd/conf.d/welcome.conf or put +Indexes in welcome.conf...also restart httpd, delete cache from your browser
did u edit /etc/hosts on all machines?
did u edit /etc/hosts on all machines?
Re: Networking Setup
I am probably doing something wrong with the hosts, so my internal IP of the server is 192.168.9.108 and I know the external, how do I properly write this into the hosts file?
Re: Networking Setup
if u host for example -- example.com on 192.168.9.108 ip
edit hosts in all machines including host machine
as root run
#vi /etc/hosts
hit a for write
in the end put
192.168.9.108 example.org
hit esc
hit :wq enter
edit hosts in all machines including host machine
as root run
#vi /etc/hosts
hit a for write
in the end put
192.168.9.108 example.org
hit esc
hit :wq enter