Question about the nameserver?
I have a RHEL Server where I want to run two website alphaweb.com and gammaweb.com. I configured Apache Server including :
Code:
What settings I need to make in /etc/hosts or DNS entry so that coleagues can browse the website through alphaweb.com and gammaweb.com?? |
Hi,
If you want others to be able to visit your sites, you need a dns that can resolve the domain names to your server's IP. If you're only interested for this to be done in a LAN you can use the hosts file of your clients. From the apache side, the "nameserver 10.14.236.99" is wrong. You need to add: Code:
NameVirtualHost * |
Let me explain what I am doing:
[code] Code:
DocumentRoot "/var/www/html" Code:
touch /var/www/html/index.php Code:
vi /etc/httpd/conf/httpd.conf Code:
NameVirtualHost 10.14.1.73 Code:
http://alpha.groupinfra.com Now If I do http://10.14.1.73 it opens up the page under /var/www/html/test/index.php. I know that its name-based VirtualHosting but how Can I make it work under the name host?What entry shall i need to edit under DNS? |
Your apache config is OK. It's normal that http://10.14.1.73 points to the 1st vhost.
You can do your tests by editing /etc/hosts (or c:\Windows\system32\drivers\etc\hosts in Windows) in your client and adding 10.14.1.73 alpha.groupinfra.com 10.14.1.73 beta.groupinfra.com If you have your own dns server you should create 2 domains: alpha.groupinfra.com, beta.groupinfra.com with each one pointing to the above IP address. |
Here in our corporate, Window Admin have already setup DNS and ADS before I joined this company. What I can do is I have few Linux Machine. How Can I setup my own DNS and make it work rather than manual entry coz I want around 10 people access the same So it would be fine if I can setup my own DNS.
Please help me setting up DNS so that I can browse both the webpage. |
There tons of howtos about configuring bind.
Since you're using RHEL, take a look at this one written for Fedora. In your case, you need to define 2 zones (alpha.groupinfra.com and beta.groupinfra.com), so you have to create 2 zone files. Also the reverse zone is not necessary and don't forget to change the IPs of the howto, to match your network. |
Maybe I'm missing an important point. And, if I am, no need to reply, just ignore...
Anyway, if your windows systems admin has already got a windows DNS server, I'd just talk to them and get them to route both of those addresses (alpha.groupinfra.com and beta.groupinfra.com) to your RHEL computer. Then, use their DNS server to resolve addresses. Just a thought. |
for RHEL DNS, see http://www.linuxtopia.org/online_boo...5_ch-bind.html
|
I have made an entry in /etc/hosts:
Code:
10.14.1.73 alphaweb.com alpha http://alphaweb.com [/code] It opens the webpage pertaining to Code:
/var/www/html/test/index.php. |
Well, I guess gammaweb.com took the place of beta.groupinfra.com. Anyway, to do what you want, you have to use
Code:
DirectoryIndex index2.php |
to MODS: this thread should be moved to either -> Linux Networking section, OR -> Linux Server section
Thanks |
All times are GMT -5. The time now is 06:15 PM. |