PDA

View Full Version : Help with DNS PLease



nigelwong
October 27th, 2005, 03:37
Okay my account is setup in cPanel. cPanel automatically creates VirtualHosts for you. Looking at the httpdconf file, i see this:

<VirtualHost 128.121.20.245>
ServerAlias xanblog.my3host.com
ServerAdmin webmaster@xanblog.my3host.com
DocumentRoot /home/nigel/public_html
BytesLog domlogs/xanblog.my3host.com-bytes_log
ServerName www.xanblog.my3host.com

User nigel
Group nigel
CustomLog /usr/local/apache/domlogs/xanblog.my3host.com combined
ScriptAlias /cgi-bin/ /home/nigel/public_html/cgi-bin/
</VirtualHost>

Now, i have also configured BIND to *.xanblog.my3host.com. IN A 128.121.20.245 <--- Do i need to do this step?

By reading other posts, i think i'm supposed to add:

<VirtualHost *>
ServerAlias *.xanblog.my3host.com
ServerAdmin webmaster@xanblog.my3host.com
DocumentRoot /home/nigel/public_html
BytesLog domlogs/xanblog.my3host.com-bytes_log
ServerName www.xanblog.my3host.com

User nigel
Group nigel
CustomLog /usr/local/apache/domlogs/xanblog.my3host.com combined
ScriptAlias /cgi-bin/ /home/nigel/public_html/cgi-bin/
</VirtualHost>

Do i add the above, or replace the old VirtualHost given by cPanel. Also, i set my DNS up in the subdomain aswell.

So basically 2 questions:
1. Do i need to configure BIND, if so how?
2. Is it <VirtualHost *> or <VirtualHost (IP)>

Thankyou.

(Currently, it redirects my site to the IP which has another site installed onto the root of the IP.)

flashweb
October 27th, 2005, 03:54
Your BIND seems confirgured correctly.

For Apache, i think it should be

<VirtualHost (IP)>

Just try and see :-)

nigelwong
October 27th, 2005, 03:57
Yeah currently thats what i'm doing. But it redirects incorrently =(... also, i host my own server so i need abit of help.

flashweb
October 27th, 2005, 04:02
Can you post your VirtualHost section from httpd.conf ?

Did you restarted Apache after changing httpd.conf ?

nigelwong
October 27th, 2005, 04:41
The file is here:

http://www.filefactory.com/get/f.php?f=f57b20f3a6f256275f99ebd1

Please look at it. There are quite alot of commented DNS settings =S

Thankyou.

(Yes i did restart apache)

flashweb
October 27th, 2005, 05:09
Use following code



<VirtualHost 128.121.20.245>
ServerAlias *.xanblog.my3host.com
ServerAdmin webmaster@xanblog.my3host.com
DocumentRoot /home/nigel/public_html
BytesLog domlogs/xanblog.my3host.com-bytes_log
ServerName www.xanblog.my3host.com

User nigel
Group nigel
CustomLog /usr/local/apache/domlogs/xanblog.my3host.com combined
ScriptAlias /cgi-bin/ /home/nigel/public_html/cgi-bin/
</VirtualHost>

nigelwong
October 27th, 2005, 06:50
Sorry i did have the *.xanblog.my3host.com, i didnt realize that i uploaded the original httpdconf file. It doesnt't work. It was thinking maybe i had to uncomment some settings. Btw, do you have MSN? If you do please add me on wong.nigel[at]gmail.com.

flashweb
October 27th, 2005, 16:48
I have added you to MSN, support{[AT]}hostonnet{[.]}com