Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #21  
Old 10th August 2010, 22:32
pawan pawan is offline
Senior Member
 
Join Date: Jul 2010
Posts: 222
Thanks: 44
Thanked 6 Times in 6 Posts
Default short URL

I have tried it both ways.

that is without creating any sub-domain and any DNS for admin

When I create the sub-domain admin for example.com and adding admin in dns A records for example.com
I am getting the home page of example.com instead of being redirected to http://server1.example.com:8080

Please tell me what I am missing.
Reply With Quote
Sponsored Links
  #22  
Old 11th August 2010, 21:13
pawan pawan is offline
Senior Member
 
Join Date: Jul 2010
Posts: 222
Thanks: 44
Thanked 6 Times in 6 Posts
 
Default short URL

Some Times not getting the full answer or hand-holding does help.

I was successful after digging in and trying various options.

I am putting it here, if it can help somebody out there.

to achieve admin.example.com redirect to server1.example.com:8080

I tried various options like:
Just putting the code provide earlier by Till in apache directive under option tab for website example.com

Code:
RewriteCond %{HTTP_HOST}   ^admin.example.com [NC]
RewriteRule ^/(.*)         http://server1.example.com:8080/ [L,R]
which was giving me error - page not found.

Then I created subdomain admin in website options and also added A record for admin in DNS record for example.com.

The result : I start getting the home page of example.com - no redirect.

Finally I deleted the sub-domain created in website options, deleted the DNS entry admin in example.com. I also deleted the code inserted in apache directive.

Than I created one new domain under :// domain option admin.example.com and created DNS records for admin.example.com.

I also created website for admin.example.com and in redirect option I inserted the full path like http://server1.example.com:8080 and in redirect type I selected [R,L] and

Presto - my-redirection was working perfectly.

I also checked the vhost file admin.example.com, where the code was automatically inserted in /etc/apache2/sited-enabled/admin.example.com.vhost file similar to given by till

Code:
 RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^admin.example.com [NC]
    RewriteRule   ^/(.*)$ http://server1.example.com:8080/$1  [R,L]
Yes there was one more problem I was facing that I was not able to access server1.example.com:8080 or even server1.example.com from other PC than server.
Than I have added server1 to DNS record of example.com, which enable me to access the server1.example.com:8080 from anywhere.

Hope this will help someone in same situation.

Regards
Reply With Quote
Reply

Bookmarks

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
automatic temporary URL for new sites apoana Tips/Tricks/Mods 18 24th June 2013 13:43
Apache - Drupal - Clean URL cord Server Operation 1 23rd July 2010 05:48
How to treat main URL on server.. eddie67 Installation/Configuration 2 24th June 2009 14:46
ISPConfig stuck with error: The URL is not reachable! adobe Installation/Configuration 4 18th September 2008 11:29
Change URL to Localhost hvrossum Installation/Configuration 1 16th December 2007 13:28


All times are GMT +2. The time now is 04:49.


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