URL masking with Godaddy and multiple sites

Hi,

Looking for either suggestions on how to fix this or advice on how to handle it differently given my situation.

We have a single web server, a single static IP and a host name.
We host multiple sites, all have domain names purchased through Godaddy and the domain is being forwarded to "servername/sitedirectory" as one would expect.
Running 10.5.4 server on an xServe

So, for every site, we'd like to see:
"www.yoursite.org" instead of "hostname/directory/page"
I enabled forwarding and masking (On the Godaddy domain) for each site and this was accomplished, I now see "yoursite.org" for every site regardless of what page I navigate to on each site.

Here's my dilemma... I would like the sites to look like this:
"www.yoursite.org/page" whereas with masking enabled, it only displays "www.yoursite.org" regardless of what page I navigate to on the site in question. I guess this is causing problems with the expression engine installation and how it handles links when masking is enabled.

Is there a way to do this with a single server and IP? We want the nice looking URL's like most other sites out there but we don't want to lose the functionality of bookmarking and seeing which individual page you're on.

Any ideas / suggestions? Is this simply not possible? I can provide additional details if you need them. Thanks in advance!

Message was edited by: Shane Depner1

Mac OS X (10.5.4)

Posted on Oct 17, 2008 5:48 PM

Reply
4 replies

Oct 18, 2008 12:36 PM in response to Shane Depner1

Is there a way to do this with a single server and IP?


Sure - don't use GoDaddy's domain masking 'feature'.

Change the DNS records in your zone so that the web server address points to YOUR IP address (you do have a static IP, right?).

Then setup your web server with multiple sites (Server Admin -> Server -> Web -> Sites), one per domain you're hosting.

For each domain you specify the source directory on disk where this site's content is.

That's it.

When people lookup your web site address, GoDaddy will return your IP address. The client will then connect to your server and Apache will look at the request to determine which site to serve.

Oct 18, 2008 5:14 PM in response to Camelot

Thanks Camelot,

Allow me to provide you some additional details. Here's where I am at now:

{quote:title=Camelot wrote:}
Sure - don't use GoDaddy's domain masking 'feature'.
{quote}

Done. Disabled masking. Currently I have each domain on godaddy 301 forwarded to the webservers IP in the following format: http://123.456.789.00

{quote:title=Camelot wrote:}
Change the DNS records in your zone so that the web server address points to YOUR IP address (you do have a static IP, right?).
{quote}

1. Yes our webserver has a static IP
2. The webserver DNS record has working forward / reverse lookups.
3. I have not added the "virtual domains" in to the webserver DNS records. I'm assuming this is part of my issue but I'm not quite sure which record type to add and exactly how to add (serveradmin DNS is strange to me) it if this is the case.
Note I am referring to the webserver DNS records in 10.5.4 and not our university DNS servers. I assume they don't need to be aware of these "virtual domains" since godaddy is forwarding to the functional webserver IP.

{quote:title=Camelot wrote:}
Then setup your web server with multiple sites (Server Admin -> Server -> Web -> Sites), one per domain you're hosting.
{quote}
Done.
First is the webserver default site followed by the virtual hosts which look like this in the GUI
domain name: mydoman.org
host description: a great site
ip address: (my webservers servers ip) 123.456.789.00
port: 80
web folder: /volumes/drive/webfiles/mydomain

Second site is setup the exact same way with obvious changes to web folder and domain name.

{quote:title=Camelot wrote:}
When people lookup your web site address, GoDaddy will return your IP address. The client will then connect to your server and Apache will look at the request to determine which site to serve.
{quote}

So currently I have two issues with this setup...

1. Upon changing godaddy forwarding to just the webservers IP (Instead of myhost.org/sitefiles) It now resolves to my default site regardless of what I type in (virtual host 1, 2, 3, whatever, they all lead to my servers default site).
2. The servers IP is what appears in the address bar regardless of what site I go to (I'm assuming this is because I have not added the virtual host DNS records on the webserver DNS configuration) but that's something I could use some clear instructions on =)

Digging around google, I found some things referencing this issue and saying you had to uncomment a line in /etc/apache2/httpd.conf pointing to /private/etc/apache2/extra/httpd-vhosts.conf

What my httpd.conf file has is:
####
#### The following Include directive is essential for the virtual hosts to be usable.
####
Include "/etc/apache2/sites/*.conf"

So I think something changed from earlier versions of 10.5.4 server because I don't have a /etc/private/apache2/extra directory.

The other common change I saw recommended online was to add my virtual hosts here:
/private/etc/apache2/extra/httpd-vhosts.conf

I think that is another outdated thing because of the note above where it now looks for virtual hosts in: /etc/apache2/sites/*.conf

So in /etc/apache2/sites I have virtual host conf files for each virtual host and:
virtual hostglobal.conf
(I'm assuming this is the equiv now of httpd-vhosts.conf)?? The only thing inside it is:
# This file is auto-generated by the Server Admin Web
# backend plugin whenever settings are saved.
# The Listen and NameVirtualHost directives are generated
# based on the VirtualHost directive inside
# each site configuration file found in this directory.
# Please add appropriate Listen and NameVirtualHost directives
# if a site is manually edited
# i.e. the site is moved from sites to sites_disabled (or vice versa)
# or the site's Virtual Host ip address and/or port is modified

# Last updated at 2008-10-18 16:26:38 -0700

(my webserver ip masked below)
Listen 123.456.789.00:80
NameVirtualHost 123.456.789.00:80

^^ If I change to "any" in the serveradmin gui for each site virtual host then this becomes *:80 but that didn't help either.

Is this all being caused by the lack of the virtual host as domains in the webserves DNS records? How do I add these in the GUI (Or command line if that's easier). I figured editing /etc/hosts as in the past would work but it did not...

Message was edited by: Shane Depner1

Message was edited by: Shane Depner1

Oct 18, 2008 5:34 PM in response to Shane Depner1

Done. Disabled masking. Currently I have each domain on godaddy 301 forwarded to the webservers IP in the following format: http://123.456.789.00


That does not sound correct. There should be no concept of forwarding, masking, or anything else in GoDaddy's configuration. If your static IP address is 1.2.3.4 then you should configure your domain (using GoDaddy's web tools) so that 'domain.com' and 'www.domain.com' point to 1.2.3.4 using a A (hostname) record.

3. I have not added the "virtual domains" in to the webserver DNS records. I'm assuming this is part of my issue but I'm not quite sure which record type to add and exactly how to add (serveradmin DNS is strange to me) it if this is the case.


If you're not running your own internal DNS then this doesn't matter.

First is the webserver default site followed by the virtual hosts which look like this in the GUI
domain name: mydoman.org
host description: a great site
ip address: (my webservers servers ip) 123.456.789.00
port: 80
web folder: /volumes/drive/webfiles/mydomain


Assuming you're on an internal/private network (e.g. 192.168.x.x or 10.x.x.x) then you should NOT set a specific IP address for your site. The IP address field should be set to 'Any'. That's because the IP address specified doesn't actually exist on this machine, so Apache can't use it.

1. Upon changing godaddy forwarding to just the webservers IP (Instead of myhost.org/sitefiles) It now resolves to my default site regardless of what I type in (virtual host 1, 2, 3, whatever, they all lead to my servers default site).


Check your default site and make sure there is no asterisk (*) set in the Site Aliases field.
If there is this tells Apache that all hostnames match this site, and other virtual hosts will never be used. This is a bad default set in the configuration and something that most people have to undo.

2. The servers IP is what appears in the address bar regardless of what site I go to (I'm assuming this is because I have not added the virtual host DNS records on the webserver DNS configuration) but that's something I could use some clear instructions on =)


I'm not sure I understand this one. Fix the above, then see if this is still an issue.

Digging around google, I found some things referencing this issue and saying you had to uncomment a line in /etc/apache2/httpd.conf pointing to /private/etc/apache2/extra/httpd-vhosts.conf


If you're using Mac OS X Server (which I assume you are since you posted in the Server forums), and you are using Server Admin to manage/configure your sites then you do not need to touch any Apache configuration file at all. The whole point of Server Admin is that it puts a nice GUI on top of the text-based configuration files, making it easier to manage your sites.

If you have already edited your configuration files, I hope you saved a copy that you can revert to 🙂
Without knowing the changes you made it's going to be really hard to fix remotely.

Oct 18, 2008 7:55 PM in response to Camelot

Hi Camelot,

Thanks again for the help! I was digging WAYYYYYY too deep for a seemingly difficult issue.

{quote:title=Camelot wrote:}That does not sound correct. There should be no concept of forwarding, masking, or anything else in GoDaddy's configuration. If your static IP address is 1.2.3.4 then you should configure your domain (using GoDaddy's web tools) so that 'domain.com' and 'www.domain.com' point to 1.2.3.4 using a A (hostname) record.{quote}

I found the "total dns control" which allows modification of the a record. When I called for the domain purchase and explained what I wanted, they said I needed the forwarding (Sigh, should have done this myself).

Everything is working beautifully now. Really irritating how this was such a simple fix and yet I spend way less time on "more difficult fixes".

Thanks again!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

URL masking with Godaddy and multiple sites

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.