virtual host indywidual configuration

Liszek

Verified User
Joined
Nov 13, 2008
Messages
6
Hi everyone

This is my first post. I am new administrator of Directadmin server. This is real good software but i can't solve one problem with virtual host configuration.

I need to config server like below:

- I want to have roundcube (webmail client) configured in subdomain like https://poczta.maindomain.com (with ssl)

and when someone put in webbrowser adress http://poczta.maindomain.com he will be by default redirected to adress https://poczta.maindomain.com.

But I don't have Idea how to do it.

When I make changes in httpd customization (in Admin panel) likes this:

|*if SUB="poczta"|
|?DOCROOT=/var/www/html/roundcube|
|*endif|

then the DocumentRoot directive for subdmomain is:

DocumentRoot /var/www/html/roundcube/poczta

I don't need "poczta" on the end of the documentroot path.

How to resolve this problem? any idea?

Thanks for help
 
You should be doing this with a rewrite command in an .htaccess file, not in httpd customization.

Jeff
 
You should be doing this with a rewrite command in an .htaccess file, not in httpd customization.

Jeff

Hmm can You write some more? I now that I cane redirect http adress in htaccess file, but can I change document root ???? How to set subdomain document root directive on DocumentRoot /var/www/html/roundcube/

???
 
No, you can't change the document root in .htaccess. Sorry, I didn't realize you wanted to do that.

Forcing https has been covered several times in these forums. Do you not want your clients to have to type in /roundcube? I still don't see that from your original post.

If you own the server you can change the userlevel httpd.conf file, including changing the document root, and then chattr it immutable, so DirectAdmin won't change it. If it's not your server you need to discuss this with your hosting company.

Jeff
 
Back
Top