|
#1
|
|||
|
|||
|
Hi!
I'm having problems adding new virtual hosts to my VPS container. I have two domains. I configured the private nameservers to maindomain.com (ns1.maindomain.com and ns2.maindomain.com) as required, althought the nameservers are still pointing to nsxxxxhostgator.com because my site is still on a shared hosting account. Then I configured the nameservers for seconddomain.com as ns1.maindomain.com and ns2.maindomain.com. I edited my httpd.conf file adding the following: ************************************************** ** #Virtual hosts Include conf/extra/httpd-vhosts.conf ************************************************** ** And I created the file conf/extra/httpd-vhosts.conf: ************************************************** ** NameVirtualHost seconddomain.com <VirtualHost *:80> # General ServerAdmin myemail@maindomain.com DocumentRoot /var/www/html/seconddomain.com ServerName www.seconddomain.com ServerAlias seconddomain.com # Logging ErrorLog logs/seconddomain.com-error_log CustomLog logs/seconddomain.com-access_log common </VirtualHost> NameVirtualHost maindomain.com <VirtualHost *:80> # General ServerAdmin myemail@maindomain.com DocumentRoot /var/www/html/maindomain.com ServerName maindomain.com ServerAlias maindomain.com # Logging ErrorLog logs/maindomain.com-error_log CustomLog logs/maindomain.com-access_log common </VirtualHost> ************************************************** ** After that, I restarted Apache. I did this yesterday, and I can't access to seconddomain.com Have I done something wrong? Should I change the nameservers of my maindomain.com to ns1.maindomain.com and ns2.maindomain.com, or is there any other mistake? Thanks for your help |
|
#2
|
||||
|
||||
|
Where is the DNS Zone for domain seconddomain.com? You say: "the nameservers are still pointing to nsxxxxhostgator.com" so that means the DNS Zone should be in that server. Is it there?
__________________
quietFinn - netFinn Finland "Be who you are and say what you feel because those who mind don't matter and those who matter don't mind." - Dr. Seuss |
|
#3
|
||||
|
||||
|
Hiya!
Have you setup BIND or another DNS service on your VPS to answer DNS queries? This may be the reason it's not responding.
__________________
Jacob P HostGator.com Systems Monitoring Supervisor |
|
#4
|
|||
|
|||
|
Thanks, GatorJacob and QuietFinn for the help, but still doesn't work.
QuietFinn: The second domain points to the ns1.maindomain.com and ns2.maindomain.com. I registered both of them, but the DNS servers for maindomain.com were in nsxxx.hostgator.com. Now I have changed it: The DNS for maindomain.com are NS1.maindomain.com NS2.maindomain.com NSxxxx.HOSTGATOR.COM NSxxxx.HOSTGATOR.COM maindomain.com works, because the third and fourth work. But seconddomain.com (DNS are NS1.maindomain.com and NS2.maindomain.com) doesn't work. GatorJacob No, I haven't setup BIND neither any other service. Thanks |
|
#5
|
||||
|
||||
|
Quote:
Quote:
2. Set at least 2 nameservers you wish to use at the domain name registrar 3. Configure your DNS server with an appropriate DNS zone file and records 4. Configure web server with relevant domain name information Looks like your problem is at number 3. If you set the nameservers for a domain name at your domain name registrar, e.g. ns1.mydomain.com & ns2.mydomain.com, then you must have a DNS server that serves the DNS records for the mydomain.com zone somewhere. If not it can't work. Assuming you are moving from your shared account, then you will need to setup BIND or similar DNS service on your VPS, or use a 3rd party DNS service. If you have a VPS with WHM/Cpanel, this is all very straight forward, otherwise you need to know your way around using the command line.... do you have such experience?
__________________
- David |
|
#6
|
|||
|
|||
|
Thanks, striddy.
Yes, I assume that's the problem. I haven't done before, so I'll try with some tutorial on Internet and, if I'm too stupid to understand it, I'll ask for cpanel. Thanks for your help. If someone knows a good tutorial... |
|
#7
|
|||
|
|||
|
I created the file /var/named/maindomain.com.db
$ttl 172800 maindomain.com. IN SOA ns1.maindomain.com. webmaster.maindomain.com. ( 2010121305 ; Serial in YYYYMMDDXX (XX is increment) 10800; refresh seconds 3600; retry 604800; expire 38400; minimum ); maindomain.com. IN A xxx.xxx.xxx.198 maindomain.com. IN NS ns1.maindomain.com. maindomain.com. IN NS ns2.maindomain.com. maindomain.com. IN MX 1 mail.maindomain.com. ns1.maindomain.com. IN A xxx.xxx.xxx.198 ns2.maindomain.com. IN A xxx.xxx.xxx.199 www IN CNAME maindomain.com. ftp IN CNAME maindomain.com. mail IN A xxx.xxx.xxx.198 And also the named.conf file: options { query-source port 53; query-source-v6 port 53; directory "/var/named"; // the default dump-file "data/cache_dump.db"; statistics-file "data/named_stats.txt"; memstatistics-file "data/named_mem_stats.txt"; }; zone "maindomain.com" { type master; file "/var/named/maindomain.com.db"; }; zone "localhost" IN { type master; file "localhost.zone"; allow-update { none; }; }; I run "rndc reload" and "service named reload" (both ok) and... It still doesn't work ![]() ![]()
|
|
#8
|
||||
|
||||
|
Check at your domain name registrar that you have both nameservers and the correct IP's registered.
If you give us the domain name, it's much easier to help you.
__________________
- David |
|
#9
|
|||
|
|||
|
Thanks a lot.
Let's forget the seconddomain. The main domain is mcinl.com On the domain registrar the DNS zone is ns1.mcinl.com, ns2.mcinl.com. Named is running. Configuration: named.conf options { /* make named use port 53 for the source of all queries, to allow * firewalls to block all ports except 53: */ query-source port 53; query-source-v6 port 53; // Put files that named is allowed to write in the data/ directory: directory "/var/named"; // the default dump-file "data/cache_dump.db"; statistics-file "data/named_stats.txt"; memstatistics-file "data/named_mem_stats.txt"; }; zone "mcinl.com" { type master; file "/var/named/mcinl.com.db"; }; zone "localhost" IN { type master; file "localhost.zone"; allow-update { none; }; }; var/named/mcinl.com.db: options { /* make named use port 53 for the source of all queries, to allow * firewalls to block all ports except 53: */ query-source port 53; query-source-v6 port 53; // Put files that named is allowed to write in the data/ directory: directory "/var/named"; // the default dump-file "data/cache_dump.db"; statistics-file "data/named_stats.txt"; memstatistics-file "data/named_mem_stats.txt"; }; zone "ugazine.net" { type master; file "/var/named/ugazine.net.db"; }; zone "mcinl.com" { type master; file "/var/named/mcinl.com.db"; }; zone "localhost" IN { type master; file "localhost.zone"; allow-update { none; }; }; On Apache: NameVirtualHost mcinl.com <VirtualHost *:80> # General ServerAdmin javier.mansilla@mcipress.fi DocumentRoot /var/www/html/mcinl.com ServerName mcinl.com ServerAlias www.mcinl.com # Logging ErrorLog logs/mcinl.com-error_log CustomLog logs/mcinl.com-access_log common </VirtualHost> Thanks again!! |
|
#10
|
||||
|
||||
|
__________________
- David |
|
#11
|
||||
|
||||
|
Hi!
I logged into your VPS and checked out named. It's running, however it's not setup fully yet. http://tldp.org/LDP/lame/LAME/linux-...me-server.html Run through that, and make sure you setup named.conf in /etc.
__________________
Jacob P HostGator.com Systems Monitoring Supervisor |
|
#12
|
|||
|
|||
|
Hi!
Thanks striddy and GatorJacob, you are the best! Now it works, but I have learnt the lesson: I need Cpanel or a constant attention from people like you, and I think I only have right to the first option. I suppose I'll need some help even with Cpanel installed, but only for small issues. Thanks again to both of you! |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Some problems... | Naruto-Empires | Shared Hosting Support | 4 | 08-12-2009 09:13 PM |
| Problems.... | SDP | Shared Hosting Support | 7 | 11-26-2007 05:44 PM |
| no problems here! | bubba | Customer Reviews | 0 | 12-10-2004 05:59 PM |
| Do we have problems | britbob | Network Status | 42 | 11-16-2004 09:05 AM |
All times are GMT -5. The time now is 11:57 PM.











