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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th August 2006, 13:12
datayoung datayoung is offline
Junior Member
 
Join Date: Jul 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Can you advice for Redirect and web home name?

I had search about rediect in this forum but still not found what I want

1. I want to set global redirect like you did on xxx.xxx/stats so any other domains/customers/reseller can use the same way not individual co-domain

here example
http://www.xxx.xxx/ispanel
then it will redirect to https://www.xxx.xxx:81

Why not use http://ispanel.xxx.xxx ? the answer is same as webalizer did for global stats,
but I don't know how webalizer done?

2.I using ispconfig with HTTPS and I saw system show Bad Request and link to https://xxx.xxx.xxx:81 after try on http://xxx.xxx.xxx:81
How to do that ?it great ,in case can't fix no.1 we can use this method and set it redirect to location as it advice in Link on page

3.can I make a public_html link from web ,so user will have web and public_html in their home -plase set it default for all domain -where Can I put this skel into it?

Last edited by datayoung; 12th August 2006 at 13:16.
Reply With Quote
Sponsored Links
  #2  
Old 12th August 2006, 14:11
jockstrap jockstrap is offline
Member
 
Join Date: Jul 2006
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default

datayoung,

I added login.domain and webmail.domain to the dns skeleton which gives me

http://login.domain and http://webmail.domain and then I put the following in the vhosts apache2 skeleton and works a treat!

RewriteEngine on
RewriteCond %{HTTP_HOST} ^webmail\. [NC]
RewriteRule ^/(.*) http://%{HTTP_HOST}:81/webmail/$1 [R]
RewriteCond %{HTTP_HOST} ^login\. [NC]
RewriteRule ^/(.*) http://%{HTTP_HOST}:81/$1 [R]


I use the roundcubemail client so I needed to creat the /webmail link with the following;

ln -s /home/admispconfig/ispconfig/web/roundcubemail /home/admispconfig/ispconfig/web/webmail
Reply With Quote
  #3  
Old 12th August 2006, 14:15
jockstrap jockstrap is offline
Member
 
Join Date: Jul 2006
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default

datayoung,

I added login.domain and webmail.domain to the dns skeleton which gives me

http://login.domain and http://webmail.domain and then I put the following in the vhosts apache2 skeleton and works a treat!

RewriteEngine on
RewriteCond %{HTTP_HOST} ^webmail\. [NC]
RewriteRule ^/(.*) http://%{HTTP_HOST}:81/webmail/$1 [R]
RewriteCond %{HTTP_HOST} ^login\. [NC]
RewriteRule ^/(.*) http://%{HTTP_HOST}:81/$1 [R]


I use the roundcubemail client so I needed to creat the /webmail link with the following;

ln -s /home/admispconfig/ispconfig/web/roundcubemail /home/admispconfig/ispconfig/web/webmail

=================================
Here is my pri.domain.master skeleton


$TTL {DNS_TTL}
@ IN SOA {DNS_NS1}. {DNS_ADMINMAIL}. (
{SERIAL} ; serial, todays date + todays serial #
{DNS_REFRESH} ; refresh, seconds
{DNS_RETRY} ; retry, seconds
{DNS_EXPIRE} ; expire, seconds
{DNS_TTL} ) ; minimum, seconds
;
IN NS {DNS_NS1}. ; Inet Address of name server 1
IN NS {DNS_NS2}. ; Inet Address of name server 2
;

<!-- BEGIN DYNAMIC BLOCK: mxrecords -->
IN MX {MX_PRIORITAET} {MX_MAILSERVER}.
<!-- END DYNAMIC BLOCK: mxrecords -->
{DNS_SOA}. IN A {DNS_SOA_IP}
<!-- BEGIN DYNAMIC BLOCK: arecords -->
{A_HOST} IN A {A_IP}
<!-- END DYNAMIC BLOCK: arecords -->
<!-- BEGIN DYNAMIC BLOCK: cnamerecords -->
{CNAME_HOST} IN CNAME {CNAME_ZIEL}.
<!-- END DYNAMIC BLOCK: cnamerecords -->
<!-- BEGIN DYNAMIC BLOCK: spfrecords -->
{SPF_HOST}. TXT "v=spf1 {SPF}"
<!-- END DYNAMIC BLOCK: spfrecords -->

webmail IN A {A_IP}
* IN A {A_IP}

;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;




============================================
Here is my vhost.conf.master


{FP_RESOURCE_CONFIG}
{FP_ACCESS_CONFIG}
###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
<!-- BEGIN DYNAMIC BLOCK: namevhost -->
{SERVERIP}
<!-- END DYNAMIC BLOCK: namevhost -->
#
#
<!-- BEGIN DYNAMIC BLOCK: vhost -->

######################################
# Vhost: {SERVERNAME}
######################################
#
#
<VirtualHost {IP}>
{HTTPD_INCLUDE}
{SUEXEC}
ServerName {SERVERNAME}
ServerAdmin {SERVERADMIN}
DocumentRoot {DOCUMENTROOT}
{SERVERALIAS}
{DIRECTORYINDEX}
{CGI}
ErrorLog {WEB_ERROR_LOG}
{PHP}
{SSI}
{WAP}
{ERRORALIAS}
{ERROR}

<IfModule mod_cband.c>
# Max 35KB/s speed for this virtualhost
# Max 10 requests per second for this virtualhost
# Max 30 open connections for this virtualhost
CBandSpeed 35kb/s 10 30

# Max 25kB/s speed, 2 requests/s and 2 open connections for any remote client
CBandRemoteSpeed 25kb/s 2 2

# redirect to http://site/bandwidth_exceeded.html
# when the limit has been reached
CBandExceededURL http://isp1.domain.com/bandwidth_exceeded.html

# 1GB virtualhost montly bandwidth limit
CBandLimit 1G

# a period of time after which the scoreboard will be cleared (4 weeks)
# (only in >=0.9.5-rc2)
CBandPeriod 30D

# Speed if Bandwidth limit exceeded
#CBandExceededSpeed 5kb/s 2 5

# virtualhost's scoreboard file
CBandScoreboard /var/www/scoreboard/{SERVERNAME}.scoreboard
</IfModule>

AliasMatch ^/~([^/]+)(/(.*))? {HTTPD_ROOT}/{WEB}/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? {HTTPD_ROOT}/{WEB}/user/$1/web/$3

RewriteEngine on
RewriteCond %{HTTP_HOST} ^webmail\. [NC]
RewriteRule ^/(.*) http://%{HTTP_HOST}:81/webmail/$1 [R]

RewriteCond %{HTTP_HOST} ^login\. [NC]
RewriteRule ^/(.*) http://%{HTTP_HOST}:81/$1 [R]

{REWRITE_RULE}
{FRONTPAGE}
</VirtualHost>
#
{SSL}
#
#
<!-- END DYNAMIC BLOCK: vhost -->


=============================================
Hope it works for you! Enjoy!
Reply With Quote
  #4  
Old 12th August 2006, 15:14
datayoung datayoung is offline
Junior Member
 
Join Date: Jul 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default May I ask Silly question,Where are they?

--I added login.domain and webmail.domain to the dns skeleton which gives me

What and where are they "dns skeleton"

RewriteEngine on
RewriteCond %{HTTP_HOST} ^webmail\. [NC]
RewriteRule ^/(.*) http://%{HTTP_HOST}:81/webmail/$1 [R]
RewriteCond %{HTTP_HOST} ^login\. [NC]
RewriteRule ^/(.*) http://%{HTTP_HOST}:81/$1 [R]

Its sound like http://webmail.domain > http://domain:81/webmail
Not what I want
type http://domain/webmail
goto https://domain:81/webmail

or May be I missed somes
Reply With Quote
  #5  
Old 12th August 2006, 23:15
jockstrap jockstrap is offline
Member
 
Join Date: Jul 2006
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes Sorry - is for webmail.domain --> domain:81/webmail

However, the same rewrite methodoloy can be used for

domain/webmail --> https://domain:81/webmail

I think.. Just search on google for mod_rewrite untill you find the example that does what you want...
That's what I did - sorry i'm not an expert on mod_rewrite so can't provide you with the rule.

All the skeletons (templates) are in /root/ispconfig/isp/conf

Last edited by jockstrap; 12th August 2006 at 23:18.
Reply With Quote
  #6  
Old 13th August 2006, 04:38
datayoung datayoung is offline
Junior Member
 
Join Date: Jul 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thanks,I try on learn things in apache

Yes,seem to be here many people try to ask about what I asked
** Redirect with cpanel style(If they used to use cpanel which have to pay high price and so popular) **
but the answer like you answered to me or co-domain stuffs which is not what they want
why? they or me ask because if can fixed

then we can migrate from cpanel without change existing users/customer feel much
Like:
they still can http://xxx.xxx/cpanel then redirect to ispconfig control panel
they still can http://xxx.xxx/webmail then redirect to ispconfig webmain

I think it thats all we want for the first stage of migration
then inside have "web" ispconfig called it for home directory name (but cpanel using public_html)
I have fixed it by

add function @symlink in /root/ispconfig/scripts/lib/config.lib.php
@symlink("$web_path/web","$web_path/pub_html");

See? inside after ftp you will *feel like* using cpanel except only outside that only redirect problem still stand oherwise they all can micgrate from cpanel without notice by users

We know cpanel is not the answer that why we move to ispconfig same as Linux guys moved from Windows,then Linux have to made samba to welcome windows 's users so people feeling same or even better than using Windows machine thaat is big step for Windows>Linux

if we can fixed this little things I am so sure more than half existing cpanel 's users will move to ispconfig then ispconfig can have more customers in the futures

Last edited by datayoung; 13th August 2006 at 04:46.
Reply With Quote
  #7  
Old 13th August 2006, 19:44
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

Quote:
Originally Posted by datayoung
then we can migrate from cpanel without change existing users/customer feel much
Like:
they still can http://xxx.xxx/cpanel then redirect to ispconfig control panel
they still can http://xxx.xxx/webmail then redirect to ispconfig webmain
If you want a redirect, have a look here: http://www.stevenhargrove.com/redirect-web-pages/
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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


All times are GMT +2. The time now is 19:03.


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