Rouncube vhost configuration on apache server.‏

Nikolai Maziashvili mkudro at outlook.com
Tue Nov 18 14:02:34 CET 2014


Hi everybody,
I'm running Kolab3.3 on Centos7 machine with apache 
2.4. Kolab comes with apache config files, whitch is very nice, but i'm 
running on the server few websites as well, so i really need to run 
Kolab on its own (sub)domain. 
When i tried to make it so i've come 
to conclusion that i do not understand anything about how redirects in 
apache works. And yes, i gave my (somewhat) best shot by trying to read 
documentation, and i really thought that i had it..... but i didn't :(
So i have decided to ask you...
Goal
 is to run Roundcubemail on it's own subdomain - sub.example.com and not
 as alias to this domain - sub.example.com/(roundcubemail,webmail)
So after giving a shot on understanding mod_rewrite i have came up with follogin:
ServerName sub.example.com
<VirtualHost *:80>
DocumentRoot /usr/share/roundcubemail/public_html/
<Directory "/usr/share/roundcubemail/public_html">
<ifModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /roundcubemail/
    # support for CSFR
    RewriteRule ^/[a-f0-9]{16}/(.*) /$1 [PT,L]
    # Be compatible with older packages and installed plugins.
    RewriteCond %{REQUEST_URI} ^/(assets/.*)
    RewriteCond %{DOCUMENT_ROOT}/%2 !-f
    RewriteCond %{DOCUMENT_ROOT}/%2 !-d
    RewriteRule ^/assets/(.*)$ /roundcubemail/$2 [PT,L]
</ifModule>
    Options +FollowSymLinks
    AllowOverride None
    <ifModule mod_authz_core.c>
        Require all granted
    </ifModule>
</Directory>
</VirtualHost>

But,
 obviously, it didn't work and got me very disappointed in myself (usual
 i think very highly of myself)... but all the jokes aside, i would 
really appreciate if someone could try to explane me how to make it 
work... and please, if you have bit of time do not just copy paste 
working vhost config (which would be nice anyway) but on the bases of 
this example, maybe, you could explane me how this rewrite works.
Thank you in advance,
Nikolai 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kolab.org/pipermail/users/attachments/20141118/9c6e0f65/attachment.html>


More information about the users mailing list