[BlueOnyx:03819] Re: DNS - I clearly don't understand this....

Jeff Folk jefffolk at mac.com
Thu Mar 4 10:29:56 -05 2010


Tony;

> Jeff,
>
> ++++++++++++++++
> I meant in Site Management -> Services -> Web... bottom field of  
> domain1.com
> vsite (web server alias). Put domain1.com.au there. Does that work?
> Jeff
> +++++++++++++
>
> Okay,  I left the first domain alone (because that is the one that  
> anything
> unknown defaults to) and on the second domain I added the alias to the
> bottom field (how did I miss that..) then I went into DNS for  
> domain2 and
> added a forward for the .com.au to the same address as the .com for  
> domain2.
>
> Then I went to the BO machine and did a Dig;
>
> [root at primary ~]# dig vpn.domain2.com.au
>
> ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> vpn.domain2.com.au
> ;; global options:  printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13829
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0,  
> ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;vpn.domain2.com.au.            IN      A
>
> ;; ANSWER SECTION:
> vpn.domain2.com.au.     3600    IN      A       192.168.0.200
>
> ;; Query time: 4 msec
> ;; SERVER: 192.168.0.254#53(192.168.0.254)
> ;; WHEN: Fri Mar  5 00:21:58 2010
> ;; MSG SIZE  rcvd: 52
>
> [root at primary ~]# dig vpn.domain2.com
>
> ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> vpn.domain2.com
> ;; global options:  printcmd
> ;; Got answer:
> ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23645
> ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0,  
> ADDITIONAL: 0
>
> ;; QUESTION SECTION:
> ;vpn.domain2.com.               IN      A
>
> ;; ANSWER SECTION:
> vpn.domain2.com.        3600    IN      A       192.168.0.200
>
> ;; Query time: 4 msec
> ;; SERVER: 192.168.0.254#53(192.168.0.254)
> ;; WHEN: Fri Mar  5 00:22:10 2010
> ;; MSG SIZE  rcvd: 49
>
> . (I changed the real domain name to domain2 but the data is real)  
> so I can
> see that my DNS on the SBS is good and then I went to my browser and  
> looked
> at http://vpn.domain2.com (domain name changed) and I get the correct
> website and in the address bar I still see http://vpn.domain2.com  
> BUT when I
> enter http://vpn.domain2.com.au the url is rewritten to
> http://vpn.domain1.com.

But, did you get directed to the correct website? The rewrite of the  
URL is normal. Notice when you go to a vsite by domain.com and it is  
rewritten to www.domain.com? Those rewrite directives are set in  
apache conf.

You can see them in the vhost include conf at /etc/httpd/conf/vhosts.  
Here is the contents of one of mine (rewrite section bold):

[root at box1 vhosts]# cat site3
# owned by VirtualHost
NameVirtualHost 75.14.24.114:80

# FrontPage needs the following four things to be here
# otherwise all the vhosts need to go in httpd.conf, which could
# get very large since there could be thousands of vhosts
ServerRoot /etc/httpd

<VirtualHost 75.14.24.114:80>
ServerName www.macwunderland.us
ServerAlias macwunderland.us
ServerAdmin admin
DocumentRoot /home/.sites/106/site3/web
ErrorDocument 401 /error/401-authorization.html
ErrorDocument 403 /error/403-forbidden.html
ErrorDocument 404 /error/404-file-not-found.html
ErrorDocument 500 /error/500-internal-server-error.html
RewriteEngine on
RewriteCond %{HTTP_HOST}                !^75.14.24.114(:80)?$
RewriteCond %{HTTP_HOST}                !^www.macwunderland.us(:80)?$  
[NC]
RewriteRule ^/(.*)                      http://www.macwunderland.us/$1  
[L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))?           /home/.sites/106/site3/users/ 
$1/web/$3
Include /etc/httpd/conf/vhosts/site3.include
# BEGIN WebScripting SECTION.  DO NOT EDIT MARKS OR IN BETWEEN.
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
# END WebScripting SECTION.  DO NOT EDIT MARKS OR IN BETWEEN.
</VirtualHost>
# end of VirtualHost owned section

You could try to comment out that section and see if that changes  
things, but I'm not well versed in those things, and the rewrite never  
bothered me... So your mileage may vary, and I'm not by any means  
suggesting to do it. I HATE breaking stuff!!  ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20100304/03c74366/attachment.html>


More information about the Blueonyx mailing list