ns1,ns2 pointed ro mysite.com !

weber2

New member
Joined
Apr 17, 2010
Messages
3
Greetings ,

I use Apache , and Nginx as Proxy.

But The problem is:

ns1,n2.site.com pointed to one of our websites !
which i don't like such things.

there is no "Apache is functioning normally " as always !
when i go to ns1.mysite.com , i will see full view of mysite.com .

Also mysite.com is on a dedicated IP.

Even when i view "Server IP" it will show me mysite.com content !

ips.conf and nginx.conf content :

# Auto generated apache config file by DirectAdmin version 1.43.3
# Modifying this file is not recommended as any changes you make will be
# overwritten when you add/remove ip's through DirectAdmin.

LogFormat "%O \"%r\"" homedir
NameVirtualHost ip:8888
NameVirtualHost ip:443
NameVirtualHost ip:8888
NameVirtualHost ip:443

(which "ip" is our ip number)

Thank you.
 
Whatever IP#s you use for ns1 and for ns2, those will be passed to apache and since apache is responding on those IP#s, it will point to the first site on that IP#. If you really don't want this, then create pages for ns1 and for ns2. Easiest (but takes a bit more space than if you did it manually) is just to create ns1.example.com as a domain under your user, and then create the error page you want (or .htaccess to a pre-existing error page), then alias ns2 to ns1.

Jeff
 
Greetings ,

I use Apache , and Nginx as Proxy.

Hello,

In this case the best way would be to add a stub into nginx:

Code:
server {
   listen       dedicated_IP_here:80 default_server;
   server_name  shared.domain;
   ...
   ...
}


It would be some kind of a default server. Note this would not work in some cases. You need to have server{} section for every domain in nginx if you want it to work.

Feel free to contact me if you need nginx to be tunned for you.
 
Back
Top