
|
View Full Version : DNS & domain setup advice for Webmin on Redhat7.2
LMS MIS 08-21-2002, 05:57 PM i need some advice on how i should go about doing this?
If you recognize me, i've been posting the past couple days and you guys have been of great help in setting up my server from scratch
I now have apache 2 & webmin installed and can view a webpage from a web browser through my main IP
I wish to set up 3 domains on this server under different IPs
What i was given is the following:
"main ip" : 123.45.671
"DNS IPs": 123.45.672, 123.45.673
domain1: 123.456.74
domain2: 123.456.75
domain3: 123.456.76
where i have set up
NS1.DOMAIN.COM 123.45.672
NS2.DOMAIN.COM 123.45.673
(this has been created and set at my name provider and all domains above have been pointed to them as my nameservers
My host has emailed me stating that the domain IPs have been allocated to such domains for 123.45.671 (main ip) as listed:
domain1: 123.456.74
domain2: 123.456.75
domain3: 123.456.76
Now i installed webmin, started Apache and have no clue how to set it up correctly in webmin or with all this info, how to best going about organizing it.
Is there anyone here who is familiar with webmin can post what to do step by step in webmin then also if anything needs to be done in Redhat or Apache
Or does anyone know of a tutorial for Newbies that will cover what i am trying to do?
I haven't used Webmin in quite some time, but a few notes...
First, your IPs (123.456.74) aren't valid. I assume they're just 'examples' to avoid giving out your real IPs, but just wanted to make sure you're not using them anywhere, as they're syntactically (spelling?) incorrect.
Apache 2 is pretty new -- it's been out for a while, and is "stable," but there are apparently issues with, for example, PHP under it.
Anyway, what I wonder is... Does webmin even support Apache 2.0? (I haven't tried it, and don't have Webmin or Apache 2 to try.)
Not saying you shouldn't use Apache 2, but the problem might just be that webmin doesn't support it. (Or, worse, it's not aware that you have Apache 2, and it's treating it like Apache 1.x, and causing havoc?)
Did you set the main site up with webmin, or did it sorta work "out of the box"?
LMS MIS 08-21-2002, 06:23 PM LOL
yea the IPs given above have obviously been changed to protect the innocent
I tried my best to word this all like one of my old engineering test questions
and yes, Webmin recognizes Apache2 on the main IP. It's tying that IP to a domain and making webmin work with the nameservers (i have unsuccesfully set up in webmin) that's giving me a headache
I'm new to Webmin also
I've used Plesk, Ensim, Cpanel, Cobalt, you name it
i just can't afford a better CP at this time and Webmin was free.
LMS MIS 08-22-2002, 03:30 AM anyone else??
:bawling:
JDTurbeville 08-22-2002, 01:30 PM From a former novice to a novice :) :
First, setup your IP address(es) to resolve
You would go to your http://<IP Address>:10000 this is the port for the administration in Webmin. Once you are in there, you would click on the following:
Hardware > Network Configuration > Network Interfaces
You will want your infterfaces active now and interfaces active at boot time to have a "eth0" and "lo" where "eth0" points to your primary IP and "lo" points to 127.0.0.1 (the localhost).
Next, you would create a virtual ethernet by inputting "eth0:0" and "eth0:1". You would input similar data as you did for "eth0" except that you would place the nameserver IPs that you listed.
If you have other IPs that you wish to do, copy this for "eth0:2" and on ...
Next, we can setup BIND. Go to
Servers > BIND DNS Manager > Select "New Master Zone"
Master server is "ns1.yourdomain.com", domain name is the domain name you wish to input and email address is the administrator email. Leave everything else the same.
Once you have that done, create NS, A, CNAME, etc records at your disposal :)
After that is done, go back to Servers > BIND DNS Manager and go to the very bottom and either "start" or "restart" the BIND server.
Finally, after defining the IP (in #1), mapping the IP to a domain (in #2), let's map the domain to somewhere in your folder!
Go to Servers > Apache Webservers
Go to "Edit Config Files" and then go all the way to the very bottom and just paste in this template:
DocumentRoot /type/the/linux/path/of/your/folder/here
ServerName name.of.your.domain.com
ServerAlias www.name.of.your.domain.com
<Directory "/the/linux/path/from/documentroot">
Options ExecCGI Includes Indexes MultiViews
</Directory>
You can choose to leave the options there or not. Next, go into your shell at Others > SSH/Telnet login or simply just enter the shell as root (via putty, OpenSSH, or whatever). Type /etc/rc.d/init.d/httpd restart to restart Apache.
That's how I would do it. Hope it helps all the Webmin newbies!
jt
LMS MIS 08-22-2002, 04:30 PM wow! thanx a lot
now i am actually getting somewhere :D
how would i know what the "linux path of my folder is"?
is this supposed to be the folder where the Apache testpage is displayed from?
was i supposed to create a folder somewhere on the box?
LMS MIS 08-22-2002, 05:36 PM [root@domain bin]# ./apachectl restart
httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName :mad:
JDTurbeville 08-23-2002, 02:23 AM The linux path to your folder is just the folder you define where you want the site to reside. Just create a folder in your linux box as my instructions say below and you'll be happy :)
If you go to /var/www/html in your RH box, that is probably an automatic entry that shows the Apache test page.
Usually, you would create something like /home/yourusername/domainname.com. This is done so that you can start at your /home/yourusername directory in FTP and then see folders that correspond to each site that you would own.
The other philosophy is having /home/user and a softlinked or mounted folder that points to /home/sites/domain.com. I used to do it this way when I had my RedHat box, but it just looked ugly to me when I was working. I probably would suggest the other method.
In terms of your hostname problem, what does it say when you type in "ipconfig -a" while inside of your root shell acct?
jt
LMS MIS 08-23-2002, 02:59 AM [root@domain root]# ipconfig -a
bash: ipconfig: command not found
i think something is set up wrong in other settings (which were set by fdcservers)
want to look at this more closely? :D
i can PM you all the info
im racking me head on this!
remember this is Apache2 so the default directory to the Apache server is different
its in /usr/local/apache2/bin/
in Apache1 it was in /etc/...
LMS MIS 08-23-2002, 03:22 AM i just set the root virtual directory so i think i am understanding that a little
when i type the domain it goes nowhere
it seems when i type ns1.domain.com in a web browser it leads to that directory now but i am trying to make the domain itself go to the directory
i set them up as such using your first method:
/home/sites/domain1
/home/sites/domain2
/home/sites/domain3
one more thing, when browsing to that domain, it doesnt seem to recognize .htm extensions and shows a directory if i use .htm
if i use .html it works as it should
i thought those were universal?
Bomber166 10-03-2002, 07:09 AM Originally posted by JDTurbeville
Next, you would create a virtual ethernet by inputting "eth0:0" and "eth0:1". You would input similar data as you did for "eth0" except that you would place the nameserver IPs that you listed.
If you have other IPs that you wish to do, copy this for "eth0:2" and on ...
Do you put these under Active Now, or Activated at boot time... And what do u put at the netmask and broadcast if its at boot time...
PHBPendragon 10-03-2002, 08:04 AM Originally posted by LMS MIS
one more thing, when browsing to that domain, it doesnt seem to recognize .htm extensions and shows a directory if i use .htm
if i use .html it works as it should
i thought those were universal?
Look at the DirectoryIndex directive in the httpd.conf file.
Looks like only index.html is listed. Add index.htm. If yoy want php, etc, and have all the modules loaded for it they will need to go there too.
From a 1.3 server -
<IfModule mod_dir.c>
<IfModule mod_php3.c>
<IfModule mod_php4.c>
DirectoryIndex index.php index.php3 index.html
</IfModule>
<IfModule !mod_php4.c>
DirectoryIndex index.php3 index.html
</IfModule>
</IfModule>
<IfModule !mod_php3.c>
<IfModule mod_php4.c>
DirectoryIndex index.php index.html
</IfModule>
<IfModule !mod_php4.c>
DirectoryIndex index.html
</IfModule>
</IfModule>
</IfModule>
Tom
|