HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Problem with 2 domains and DNS (http://www.howtoforge.com/forums/showthread.php?t=40195)

Kas 17th October 2009 04:51

Problem with 2 domains and DNS
 
I have 2 domains. This domains resolved correctly the server ip.

I add first domain and create zone dns.

The domain its works

I add second domain and create zone dns.

Now, when you access to second domain, automatic redirect to fisrts domain.

what is the problem?

Sorry for my english and thanks for all

till 17th October 2009 09:51

I dont think that this is dns related. I guess you tried to access the websites? Then make sure that you selected the correct IP address in the website dettings for each website and not *.

Kas 17th October 2009 12:31

First Domain:

http://www.bibliotecahentai.net/0001.jpg

Quote:

<Directory /var/www/bibliotecahentai.net>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost 213.186.57.137:80>
DocumentRoot /var/www/bibliotecahentai.net/web

ServerName bibliotecahentai.net
ServerAlias www.bibliotecahentai.net
ServerAdmin webmaster@bibliotecahentai.net

ErrorLog /var/log/ispconfig/httpd/bibliotecahentai.net/error.log

ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 503 /error/503.html

<Directory /var/www/bibliotecahentai.net/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client0/web4/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>

# suexec enabled
SuexecUserGroup web4 client3
# php as fast-cgi enabled
<Directory /var/www/bibliotecahentai.net/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web4/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride all
Order allow,deny
Allow from all
</Directory>


</VirtualHost>
Quote:

ks30935:~# dig bibliotecahentai.net

; <<>> DiG 9.5.1-P3 <<>> bibliotecahentai.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51350
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;bibliotecahentai.net. IN A

;; ANSWER SECTION:
bibliotecahentai.net. 86400 IN A 213.186.57.137

;; AUTHORITY SECTION:
bibliotecahentai.net. 86400 IN NS ks30935.kimsufi.com.
bibliotecahentai.net. 86400 IN NS ns.kimsufi.com.

;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Oct 17 12:27:38 2009
;; MSG SIZE rcvd: 104
Second Domain:

http://www.bibliotecahentai.net/0002.jpg

Quote:

<Directory /var/www/imageshentai.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost 213.186.57.137:80>
DocumentRoot /var/www/imageshentai.com/web

ServerName imageshentai.com
ServerAdmin webmaster@imageshentai.com

ErrorLog /var/log/ispconfig/httpd/imageshentai.com/error.log

ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 503 /error/503.html

<Directory /var/www/imageshentai.com/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client0/web5/web>
Options FollowSymLinks
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all
</Directory>

# php as fast-cgi enabled
<Directory /var/www/imageshentai.com/web>
AddHandler fcgid-script .php .php3 .php4 .php5
FCGIWrapper /var/www/php-fcgi-scripts/web5/.php-fcgi-starter .php
Options +ExecCGI
AllowOverride all
Order allow,deny
Allow from all
</Directory>


</VirtualHost>

Quote:

ks30935:~# dig imageshentai.com

; <<>> DiG 9.5.1-P3 <<>> imageshentai.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52071
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;imageshentai.com. IN A

;; ANSWER SECTION:
imageshentai.com. 86400 IN A 213.186.57.137

;; AUTHORITY SECTION:
imageshentai.com. 86400 IN NS ks30935.kimsufi.com.
imageshentai.com. 86400 IN NS ns.kimsufi.com.

;; Query time: 2 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Oct 17 12:28:34 2009
;; MSG SIZE rcvd: 97
If you access to www.bibliotecahentai.net dont have problem, but you access to www.imageshentai.com, redirect to www.bibliotecahentai.net

till 17th October 2009 12:35

I dont get redirected when I access www.imageshentai.com. I get two different sites which both seem to be working. You should check the hosts file on your workstation, maybe you defined some kind of dns override there.

Kas 17th October 2009 12:44

Appears this message in imageshentai.com?

Quote:

Por labores de mantenimiento en el servidor, la subida de imagenes estara desactivada temporalmente


For maintenance in the server, the upload of images will be deactivated temporarily
If it appears, is for you still see the old server

till 17th October 2009 12:48

Yes, thats the message that I get. Be aware that changes in DNS take up to 48 hours until they get active in all dns caches.

Also make sure that your dns server is really the authoritive dns server for this domain. You can check your domain e.g. with www.intodns.com

Kas 17th October 2009 12:54

DNS is correct.

DNS:

ks30935.kimsufi.com
ns.kimsufi.com

The problem is all domain to use this DNS and redirect to server redirect to bibliotecahentai.net

The base web in server is this:

http://213.186.57.137/

And should this url, http://ks30935.kimsufi.com/ = http://213.186.57.137/, but yo access to http://ks30935.kimsufi.com/ redirect to bibliotecahentai.net

till 17th October 2009 12:58

You can not access the sites by IP or the server hostname. You have to use the domain name of the website or you will get redirected to the first site of the apache server. Also be aware that you configured the sites to not server content for www.imageshentai.com, currently it is configured to server only pages for imageshentai.com without www as you selected auto-subdomain none.

Kas 17th October 2009 13:07

i add auto-subdomain www to both domains.

Quote:

You can not access the sites by IP or the server hostname. You have to use the domain name of the website or you will get redirected to the first site of the apache server.
In my register domain used ks30935.kimsufi.com and ns.kimsufi.com in domain for appear to server.

Now, in server configuration, waht i have change?

very very thanks for all help me


All times are GMT +2. The time now is 22:32.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.