We are happy to announce that Vesta is back under active development as of 25 February 2024. We are working on v1 candidate and expect to engage more with the community over the coming months. We are committed to open source, and we encourage contributors to help us build the future of Vesta.
Webmail and Subdomain redirection
-
- Posts: 1
- Joined: Mon Sep 15, 2014 1:33 pm
Webmail and Subdomain redirection
Hi,
It's possible to associate a subdomain to the Webmail url ? like :
www.toto.com/webmail
to
toto.titi.com ?
I've tried to change in the httpd.com the document root path of my web server by the path of the Webmail, and i've changed the right to my user, it's work but when i try to log on Roundcube, its say "invalid session"...it work only if i use the root domain name.
It's possible to change the default URL Webmail by a subdomaine name ?
(sorry for my English, i hope you understand what i say...)
Thanks in advance.
It's possible to associate a subdomain to the Webmail url ? like :
www.toto.com/webmail
to
toto.titi.com ?
I've tried to change in the httpd.com the document root path of my web server by the path of the Webmail, and i've changed the right to my user, it's work but when i try to log on Roundcube, its say "invalid session"...it work only if i use the root domain name.
It's possible to change the default URL Webmail by a subdomaine name ?
(sorry for my English, i hope you understand what i say...)
Thanks in advance.
Re: Webmail and Subdomain redirection
Hi,
Yes, possible, but need create custom temlates and at config exist MAIL_URL variable. But any way need change some vestacp code, cause with this solution can be done just single mail.domain.com link at panel menu.
Best Regards.
Yes, possible, but need create custom temlates and at config exist MAIL_URL variable. But any way need change some vestacp code, cause with this solution can be done just single mail.domain.com link at panel menu.
Best Regards.
Re: Webmail and Subdomain redirection
Hey,
I was stumbeling about this thread, because I had the same whishes to do this.
For me it worked to edit the regarding templates in "/usr/local/vesta/data/templates/web/apache2" (Debian Distro).
I just created another Virtualhost, pointing to the Maildirectory. Of course I deleted the roundcube.conf from
/etc/apache2/conf.d
and took the content to make the template from it.
Just add this code into your template file (e.g.: /usr/local/vesta/data/templates/web/apache2/phpfcgid.tpl).
For https support you have to modify the code a bit, similar to the the *.stpl files.
After creating the templates, you have to rebuild the user Apache2 config files. To do that run the following in terminal:
for just one single user or
for each user in your vestacp system.
Ah! Of course you can setup the VirtualHost with fcgi! So every client get it's own process instance based on the user account while accessing the subdomain.
I just disabled it as a workarround to get the possibility of using roundcubes password plugin to change email passwords.
I guess while running an update, the templatefiles gonna reset to default. Also v-update-webtemplates *username* does. You should store a copy of your templates in case of an update somewhere.
Currently I don't really get the way vesta is creating these templates. However, in a way it's just a workarround. I'm looking forward for better solutions.
Best regards,
Kalle
I was stumbeling about this thread, because I had the same whishes to do this.
For me it worked to edit the regarding templates in "/usr/local/vesta/data/templates/web/apache2" (Debian Distro).
I just created another Virtualhost, pointing to the Maildirectory. Of course I deleted the roundcube.conf from
/etc/apache2/conf.d
and took the content to make the template from it.
Just add this code into your template file (e.g.: /usr/local/vesta/data/templates/web/apache2/phpfcgid.tpl).
For https support you have to modify the code a bit, similar to the the *.stpl files.
Code: Select all
# email subdomain support for each user
<VirtualHost %ip%:%web_port%>
ServerName mail.%domain_idn%
ServerAdmin %email%
DocumentRoot /var/lib/roundcube
ScriptAlias /cgi-bin/ %home%/%user%/web/%domain%/cgi-bin/
Alias /vstats/ %home%/%user%/web/%domain%/stats/
Alias /error/ %home%/%user%/web/%domain%/document_errors/
CustomLog /var/log/%web_system%/domains/%domain%.bytes bytes
CustomLog /var/log/%web_system%/domains/%domain%.log combined
ErrorLog /var/log/%web_system%/domains/%domain%.error.log
Alias /roundcube/program/js/tiny_mce/ /usr/share/tinymce/www/
Alias /roundcube /var/lib/roundcube
# Access to tinymce files
<Directory "/usr/share/tinymce/www/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Directory /var/lib/roundcube/>
Options +FollowSymLinks
# This is needed to parse /var/lib/roundcube/.htaccess. See its
# content before setting AllowOverride to None.
AllowOverride All
order allow,deny
allow from all
</Directory>
# Protecting basic directories:
<Directory /var/lib/roundcube/config>
Options -FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/lib/roundcube/temp>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
<Directory /var/lib/roundcube/logs>
Options -FollowSymLinks
AllowOverride None
Order allow,deny
Deny from all
</Directory>
</VirtualHost>
Code: Select all
v-rebuild-web-domains *USERNAME*
Code: Select all
for user in $(v-list-sys-users plain); do v-rebuild-web-domains $user; done
Ah! Of course you can setup the VirtualHost with fcgi! So every client get it's own process instance based on the user account while accessing the subdomain.
I just disabled it as a workarround to get the possibility of using roundcubes password plugin to change email passwords.
I guess while running an update, the templatefiles gonna reset to default. Also v-update-webtemplates *username* does. You should store a copy of your templates in case of an update somewhere.
Currently I don't really get the way vesta is creating these templates. However, in a way it's just a workarround. I'm looking forward for better solutions.
Best regards,
Kalle
Re: Webmail and Subdomain redirection
It's easy if you create a general rule on roundcube config for the server.
Solution here: viewtopic.php?f=12&t=8925&p=36627#p36627
Solution here: viewtopic.php?f=12&t=8925&p=36627#p36627