Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 6th September 2006, 06:23
Dave Lane Dave Lane is offline
Junior Member
Join Date: Mar 2006
Location: Christchurch, New Zealand
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via ICQ to Dave Lane
Default Tip: URL Aliases vs. Redirects

This one had me stumped for a long time - how to use the ISPConfig interface to specify Co-Domains that should redirect vs. those that should simply be aliases...

Turns out it's easy, just not obvious.

Here's the scenario: I have a new hosting client who wants to run 2 separate Drupal sites off of one account, with two separate domains: domainone.com and domaintwo.com. Because of Drupal's "multisite" capabilities, I want requests for both domains to go to the same DocumentRoot /srv/www/clientXX/web/drupal but to do so with the original domain name intact - i.e. I want the virtual host configuration to direct requests for both domainone.com and domaintwo.com to that DocumentRoot without rewriting them. That's what I refer to as domain aliasing.

To complicate things, my clients want the www. subdomains to redirect to their respective naked domains, i.e. if a user types in the URL http://www.domainone.com - it should get to the right place, but the domain that's actually fed to Apache should be domainone.com (without the www).

The way to achieve this is as follows:
1. create a "new site" or go to an existing site you want to modify

First the alias:
2. choose one domain as the "master" domain for the ISPConfig site "basis" - let's say domainone.com
3. go to the co-domain tab and enter "new" co-domain
4. set the "domain" to be domaintwo.com - enter nothing else (no forward info or anything - this will be an alias to the default domain, domainone.com - but will not be rewritten to anything. This corresponds to simply creating a "ServerAlias" entry in the VirtualHost definition.

Now the redirects:
5. create a "new" co-domain, enter "www" for the host and "domainone.com" for the domain
6. then go to the "forward" tab and enter the full URL you want to redirect to: http://domainone.com - this will create the appropriate ServerAlias entry as well as the Rewrite rules.
7. repeat 5 and 6 for domaintwo.com

Hope that helps someone!

Reply With Quote
Sponsored Links


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email aliases problem rosa hsiao General 12 21st September 2006 17:01
creation of multiple aliases rantoniazzi Installation/Configuration 3 25th May 2006 17:29
Can't receive email for aliases sbecker Installation/Configuration 10 4th April 2006 17:51
Mail Redirects and Mailing Lists bogdinator General 1 22nd February 2006 19:31
Delivery failure when using aliases ggouts Server Operation 2 20th February 2006 10:17

All times are GMT +2. The time now is 13:06.

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