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.
Reply
 
Thread Tools Display Modes
  #11  
Old 25th May 2007, 10:34
LeoXavior LeoXavior is offline
Junior Member
 
Join Date: May 2007
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quick question for radmin_h..

When you are creating the co-domain for * example.com are you checking the option for ISPConfig to create the DNS records for you?

I'm still having problems with getting it to re-write, using a recently updated ISPConfig setup with the same details from above, i'm including the user_rewrite.conf in the Apache Directives in ISPConfig via:
Code:
RewriteEngine On
Include /etc/apache2/user_rewrite.conf
My DNS info for my domain currently:
Code:
A Record 
  IP-Adresse  	  Hostname 
  72.148.231.196  	  www 
 
  CNAME 
  Hostname  	  Target 
  *  	  serverhash.com 
 
  MX 
  Mailserver  	  Hostname 
  www.serverhash.com  	  www 
  www.serverhash.com  	   

  SPF 
Hostname
serverhash.com
Does this appear to be correct?
Attached Images
 

Last edited by LeoXavior; 25th May 2007 at 10:56.
Reply With Quote
Sponsored Links
  #12  
Old 25th May 2007, 10:56
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 420
Thanks: 33
Thanked 24 Times in 19 Posts
Send a message via ICQ to radim_h
Default

Im not sure about path to user_rewrite.conf
I have it in my apache ServerRoot (which is /etc/httpd check yours in httpd.conf) and included it without path just
Include user_rewrite.conf

You have to discover it in your distro .)



No, i'm writing DNS records by myself, and anyway it will create A record, it is suposed to be * CNAME example.com

you also dont need 72.148.231.196 www ( * CNAME example.com is taking care of www)

My DNS looks like this:

A Record
IP-Adresse Hostname
(empty, A record for example.com is allready created, see bind records in /var/named/chroot/var/named)

CNAME
Hostname Target
* example.com
mail mail.myhosting.cz

MX
Mailserver Hostname
10 mail.myhosting.cz
20 mailbackup.myhosting.cz

Last edited by radim_h; 28th May 2007 at 22:22.
Reply With Quote
  #13  
Old 27th May 2007, 11:47
LeoXavior LeoXavior is offline
Junior Member
 
Join Date: May 2007
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks again, that got it working properly =)
Reply With Quote
  #14  
Old 2nd January 2008, 23:41
garymaurizi garymaurizi is offline
Junior Member
 
Join Date: Jan 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default help!

how could i do this if webmail is in /home/admispconfig/ispconfig/web/roundcubemail/

It is outside of the document root. Using Mod_Rewrite seems to break roundcube & it wont login? & mail.anydomain.tld is not working for me?

I used the ispconfig update function to install roundcube, and it defaults to https://anydomain.tld:81/roundcubemail/index.php

I would like mail.anydomain.tld to use http on port 80 not https @ port 81, I've currently in user_rewrite.conf:

Quote:
RewriteEngine on
RewriteCond %{SERVER_NAME} ^mail.*.*$
RewriteRule .* /home/admispconfig/ispconfig/web/roundcubemail$0 [L]
RewriteCond %{SERVER_NAME} !^www\.
RewriteCond %{SERVER_NAME} !^www2\.
RewriteCond %{SERVER_NAME} !^mysql2\.
RewriteCond %{SERVER_NAME} ^([^.]*)\.(.*\..*)$
RewriteRule ^/(.*)$ /var/www/www.%2/user/%2_%1/web/$1 [L]

(user.anydomain.tld redirection does work fine).

I would like to be able to login @ both mail.anydomain.com && https://anydomain.tld:81/roundcubemail/index.php

perhaps there is a way to do something like this with user_rewrite.conf to forward 80 to 81@https for both security and client convienence also? Ive seen mod_rewrite and simmiliar forward port.

Last edited by garymaurizi; 3rd January 2008 at 00:08.
Reply With Quote
  #15  
Old 3rd January 2008, 15:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by garymaurizi
how could i do this if webmail is in /home/admispconfig/ispconfig/web/roundcubemail/

It is outside of the document root. Using Mod_Rewrite seems to break roundcube & it wont login? & mail.anydomain.tld is not working for me?

I used the ispconfig update function to install roundcube, and it defaults to https://anydomain.tld:81/roundcubemail/index.php

I would like mail.anydomain.tld to use http on port 80 not https @ port 81, I've currently in user_rewrite.conf:




(user.anydomain.tld redirection does work fine).

I would like to be able to login @ both mail.anydomain.com && https://anydomain.tld:81/roundcubemail/index.php

perhaps there is a way to do something like this with user_rewrite.conf to forward 80 to 81@https for both security and client convienence also? Ive seen mod_rewrite and simmiliar forward port.
This might be interesting for you: http://www.howtoforge.com/apache_rev...roxy_ispconfig
__________________
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
  #16  
Old 3rd January 2008, 18:35
garymaurizi garymaurizi is offline
Junior Member
 
Join Date: Jan 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Thanks falko

EDIT: Simple confusion, please see next post.

Last edited by garymaurizi; 3rd January 2008 at 19:47.
Reply With Quote
  #17  
Old 3rd January 2008, 19:46
garymaurizi garymaurizi is offline
Junior Member
 
Join Date: Jan 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default mod_rewrite gives me a headache ;o/

Update: Took a crash course in mod_rewrite & got the url mask working,
As a side note, if you are using ispconfig with global php disabled you will need to do the following (i don't know how elegant or secure this is) to get the roundcube login to show up @ mail.anydomain.tld

<Directory /home/admispconfig/ispconfig/web/roundcubemail/>
php_admin_value open_basedir none
</Directory>


however now that mail.anydomain.tld functions to serve the roundcube mail login page through Leo's rewrite conditions, I can not login through roundcube @ mail.anydomain.tld, I get a 404, roundcube log shows...

Quote:
[03-Jan-2008 14:48:29 -0800] DB Error: DB Error: unknown error Query: 8 ** DELETE FROM session WHERE sess_id='8f66526f0cc6c9310131545da1ed5f76' [nativecode=sqlite_query() [<a href='function.sqlite-query'>function.sqlite-query</a>]: attempt to write a readonly database] in /home/admispconfig/ispconfig/web/roundcubemail/program/include/rcube_db.inc on line 505
???????


UPDATE: Works fine!!!! sorry , there was a rogue .httaccess file in */roundcube! silly me.

Last edited by garymaurizi; 4th January 2008 at 00:23.
Reply With Quote
  #18  
Old 20th April 2008, 20:33
amoniak amoniak is offline
Junior Member
 
Join Date: Apr 2008
Posts: 14
Thanks: 2
Thanked 4 Times in 3 Posts
Default

hello

I am using this mod on some accounts and I have a question:

http://user.domain.tld (third level domain) works fine, but how can I configure it to be also working for http://www.user.domain.tld ?

any help would be greatly appreciated!

many thx!
Reply With Quote
  #19  
Old 22nd April 2008, 00:21
garymaurizi garymaurizi is offline
Junior Member
 
Join Date: Jan 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by amoniak
hello

I am using this mod on some accounts and I have a question:

http://user.domain.tld (third level domain) works fine, but how can I configure it to be also working for http://www.user.domain.tld ?

any help would be greatly appreciated!

many thx!
Fairly certain this is not possible, you can attempt to alter the rewrite rules to pull this off but that would require you to treat & parse every instance of www. as a level 2 subdomain which would essentially bust www.domain.tld and fix www.user.domain.tld.

However, creating a new site with its own DNS records for each user.domain.tld with a *.user.domain.tld co-domain(sub) should allow this. (unfortunetally thats the only way I can think to accomplish this). If you manage to figure out a more elegant solution please let me know!

Best of luck,
Gary Maurizi.
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
Statistic not working mzo Installation/Configuration 49 20th April 2011 12:19
Anything I can do against illegal login-requests? schmidtedv Installation/Configuration 17 7th November 2008 09:25
Squirellmail and user names in "mail from ..." SkIRmiS Installation/Configuration 2 23rd October 2006 10:37
Mail Login, simple user names??? Kernal Panic Installation/Configuration 1 16th June 2006 02:45
User-name and subdomains for each user? (user@mydomain.com; user.mydomain.com) Pasco General 1 18th September 2005 19:35


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


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