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
  #1  
Old 9th August 2010, 16:54
pawan pawan is offline
Senior Member
 
Join Date: Jul 2010
Posts: 222
Thanks: 44
Thanked 6 Times in 6 Posts
Default short url for SERVER

Dear All,
Can I access http://server1.example.com:8080 by creating an alias or URL redirect like admin.example.com etc.

I think it will be more convenient for the customers to login to the account by easy URL.

Regards
Pawan Joshi
Reply With Quote
Sponsored Links
  #2  
Old 9th August 2010, 16:57
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
Default

Yes, you can do this e.g. with apache rewrite rules.

For examples see here:

http://httpd.apache.org/docs/current...d_rewrite.html
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 9th August 2010, 23:22
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
Default

Till, I've read through a load of documentation for the mod_rewrite module but can't figure out how to do it for a port such as :8080.

Also, must the module be set in httpd.conf?
Reply With Quote
  #4  
Old 9th August 2010, 23:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
Default

The rules should work for ports as well. e.g.

Code:
RewriteCond %{HTTP_HOST}   ^admin.example.com [NC]
RewriteRule ^/(.*)         http://server1.example.com:8080/ [L,R]
Quote:
Also, must the module be set in httpd.conf?
No. It is lready enabled.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 10th August 2010, 08:50
pawan pawan is offline
Senior Member
 
Join Date: Jul 2010
Posts: 222
Thanks: 44
Thanked 6 Times in 6 Posts
Default short URL

Dear Till,
Thanks for the detailed explanation by example.

Though I have not tried it, I have another question that is say I have five domain created in ISPCONFIG.

I can access ISPCONFIG control panel login from anydomain.tld:8080 that is any five domains with :8080. is it ok.
Reply With Quote
  #6  
Old 10th August 2010, 13:28
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
Default

Must I write Tills example in the website options box?
Reply With Quote
  #7  
Old 10th August 2010, 15:14
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
Default

Okay Im really tearing my hair out with this one.

Im using the code:

RewriteEngine on
RewriteRule ^/admin$ %{HTTP_HOST}:8080/ [R]

which of course doesn't work because it takes me to the url
http://mydomain.com/mydomain.com:8080

How can i get rid of the first part so im left with domain.com:8080?
Reply With Quote
  #8  
Old 10th August 2010, 16:14
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
Default

Quote:
How can i get rid of the first part so im left with domain.com:8080?
Please see my example above. You are currently redirecting to a path and I'am redirecting to URL in my example.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 10th August 2010, 18:08
HyperAtom HyperAtom is offline
Member
 
Join Date: Jan 2010
Posts: 79
Thanks: 7
Thanked 3 Times in 3 Posts
Default

Hmm still cant get it to work.

I tried

RewriteCond %{HTTP_HOST} ^domain.ath.cx/admin [NC]
RewriteRule ^/(.*) domain.ath.cx:8080/ [L,R]

could you please point out what im doing wrong?

I dont want a subdomain, just a directory to redirect.
Reply With Quote
  #10  
Old 10th August 2010, 18:11
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,389 Times in 4,234 Posts
 
Default

You entered a path as redirect target but you have to use a URL. A URL starts with http://. So your rewrite rule has to be a URL like this:

RewriteRule ^/(.*) http://domain.ath.cx:8080/ [L,R]
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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 08:45.


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