LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-04-2008, 08:28 PM   #1
rajendrapoudel
LQ Newbie
 
Registered: Jul 2007
Posts: 28

Rep: Reputation: 15
Post Please Help me !!!


I have Installed CentOS5.

My PC has 2 Etheernet Port. I have connected UTP cable in only one Ethernet port and the network configuration as as below and connected with the my ISP.
IP Address :221.243.63.179/29.
Primary DNS- 61.122.127.74
Secondary DNS- 61.122.116.174
Gateway-221.243.63.177

I want to configure my Server as a Web server. I have only 1 Public IP available (221.243.63.179) But I want to host more then 100 websites in my webserver. So how I can configure 100 websites by this one Public IP address.?

My Second question is about my DNS sever
-------------------------------------------
During registration of my website I need to give the DNS address of my websites. As I understand If I give my own web server as a DNS server (Resolver) then I need to configure my sever as DNS sever. From this logic I try to configure My Server as DNS server.

Then I have changed My network Configuration as below
IP Address :221.243.63.179/29.
Primary DNS-221.243.63.179
Secondary DNS-
Gateway-221.243.63.177
Also I have changed following files
-------------------
File Name:ifcfg-eth0
-------------
# Intel Corporation 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller
DEVICE=eth0
BOOTPROTO=static
BROADCAST=221.243.63.183
HWADDR=00:13:20:1C:6D:B1
IPADDR=221.243.63.179
IPV6INIT=yes
IPV6_AUTOCONF=yes
NETMASK=255.255.255.248
NETWORK=221.243.63.176
ONBOOT=yes
---------------------
Another file
File Name:hosts
---------------
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
221. 243.63.179 mytinybox.linux.com mytinybox
-----------------
Another file
File Name:resolv.conf
----------------
nameserver 221.243.63.179
search localhost
-------------------
Another File
named.conf
-----------------

and I have modified named.conf as following.
// Red Hat BIND Configuration Tool
//
// Default initial "Caching Only" name server configuration
//

server 221.243.63.179 {
};
options {
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses and unprivileged
* port by default.
*/
// query-source address * port 53;
};

zone "lantipur.com." IN {
type master;
file "lantipur.com.db";
};


zone "shantipur.com." IN {
type master;
file "shantipur.com.db";
};
zone "0.0.0.IN-ADDR.ARPA." IN {
type master;
file "0.0.0.db";
};
zone "vantipur.com." IN {
type master;
file "vantipur.com.db";
};
zone "63.243.221.IN-ADDR.ARPA." IN {
type master;
file "221.243.63.db";
};
zone "mytinybox.linux.com." IN {
type master;
file "mytinybox.linux.com.db.signed";
};
zone "." IN {
type hint;
file "named.root";

};


include "/etc/rndc.key";

Another File
----------------
File Name: 221.243.63.db

$TTL 1H
@ SOA mytinybox.linux.com. root.mytinybox.linux.com. ( 8
3H
1H
1W
1H )
IN 1H NS mytinybox.linux.com.
NS mytinybox.linux.com.
179 PTR www.shantipur.com.
179 PTR www.lantipur.com.

Another File
--------------
File Name: lantipur.com.db
-----
$TTL 1H
@ SOA mytinybox.linux.com. root.mytinybox.linux.com. ( 3
3H
1H
1W
1H )
IN 1H A 221.243.63.179
NS mytinybox.linux.com.
IN 1H A 221.243.63.179
www IN 1H A 221.243.63.179


Another File
---------------------
File Name:shantipur.com.db
-----
$TTL 1H
@ SOA mytinybox.linux.com. root.mytinybox.linux.com. ( 3
3H
1H
1W
1H )
IN 1H A 221.243.63.179
NS mytinybox.linux.com.
IN 1H A 221.243.63.179
www IN 1H A 221.243.63.179
-----------------
Another File
------------
File Name:vantipur.com.db
-----
$TTL 1H
@ SOA mytinybox.linux.com. root.mytinybox.linux.com. ( 3
3H
1H
1W
1H )
IN 1H A 221.243.63.179
NS mytinybox.linux.com.
IN 1H A 221.243.63.179
www IN 1H A 221.243.63.179
----------------------
Another File
---------
File Name: 0.0.0.db
-----------------
$TTL 1H
@ SOA mytinybox.linux.com. root.mytinybox.linux.com. ( 2
3H
1H
1W
1H )
NS mytinybox.linux.com.
0 PTR www.vantipur.com.
---------------------

After all this I can not access Internet in my PC. I lost Internet.
If some one please teach me where I am doing mistake.
Also teach me how I can succcessfully configure my web server and my DNS server.
My e-mail: rajendapoudel@hotmail.com
Thanks
 
Old 08-04-2008, 09:14 PM   #2
Jason_Zhou
LQ Newbie
 
Registered: Feb 2008
Posts: 1

Rep: Reputation: 0
virtual host please.
 
Old 08-04-2008, 10:31 PM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
For the first question, do some research on name virtual hosts (NameVirtualHost directive in apache).

For the second, I'd suggest you use a name service rather than trying to run you own DNS - you'l get redundant servers, etc that way. There are plenty of providers around. One I use is zoneedit.com, but there are others as well
 
Old 08-04-2008, 10:36 PM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
ACK !! 2 responses and no admonishment for that horrible post title !! I'll fix that right now..

rajendrapoudel "PLEASE HELP ME" is a truly awful title for a post. You need to make the post title apply to the question you are asking. Many people will skip right over your post just because of that lame title. other things to avoid are URGENT !! IMPORTANT !! cause well, it's just not urgent or important for people that volunteer their time to help you.
[/soapbox]

OK so you got two good answers now.. off you go to read the docs
http://httpd.apache.org/docs/2.0/vhosts/

come back if you need more help, and please use a better title for your post next time..
 
Old 08-04-2008, 10:43 PM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I'm in a good mood!
 
Old 08-04-2008, 10:50 PM   #6
edong23
Member
 
Registered: Apr 2005
Distribution: Slackware
Posts: 350

Rep: Reputation: 30
ok ok, horrible post title, he gets it im sure...

now then.. apache and lighttpd both (and probably more) have configuration files that can host numerous domains on one box easily. simply either cname then entries in dns to your webserver box i.e:

www.example.com cname to www.rajendrapoudel.com
www.example2.com cnam to www.rajendrapoudel.com


or just make A records in the dns entries. either way.. as long as they point to the same server..

the webserver software will look at the header and identify which page is being queried. there are lots on tutorials on LQ about virtual hosting.
 
Old 08-05-2008, 07:13 PM   #7
rajendrapoudel
LQ Newbie
 
Registered: Jul 2007
Posts: 28

Original Poster
Rep: Reputation: 15
Re: About DNS and web server configuration

Thanks for edong23, farslayer and Jason_Zhou. I will go through as your suggestion!!!
 
Old 08-05-2008, 07:21 PM   #8
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You're welcome!
 
  


Reply

Tags
centos5



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration