Page 1 of 1

Change Login Page

Posted: Fri Jun 12, 2015 5:39 pm
by zagzter
Good evening,

How can I change Roundcube's login URL from http://www.domain.com/webmail to http://webmail.domain.com/?

Re: Change Login Page

Posted: Sat Jun 20, 2015 5:01 pm
by zagzter
Cmon guys..anyone?

Re: Change Login Page

Posted: Sat Jun 20, 2015 5:34 pm
by mike08
Hey,

(Lets suppose that you are using Debian distro)
You have to create a new virtual host for your apache template and a new dns record in the DNS templates as well so that you can automatically create the domain name to webmail.domain.com then you have to rebuild you web domains so that they can take effect.

e.g:

You have to modify the template for apache2 first going to

Code: Select all

/usr/local/vesta/data/templates/web/apache2/
and editing the apache template that you are using for your hosted domains, in my case I'm using phpfcgid.tpl.

As soon as you are there, edit the file with your favorite text viewer.

Code: Select all

nano phpfcgid.tpl
And at the end of the file qhere you can see </VirtualHost> add this:

Code: Select all

# email subdomain support for each user
<VirtualHost %ip%:%web_port%>

    ServerName webmail.%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>
Then save the file

Code: Select all

Ctrl + X then type Y enter
Then you have to modify your DNS template at:

Code: Select all

/usr/local/vesta/data/templates/dns
(I'm using default.tpl)

Code: Select all

nano default.tpl
And add this at the end of the file:

Code: Select all

ID='10' RECORD='webmail' TYPE='A' PRIORITY='' VALUE='%ip%' SUSPENDED='no' TIME='%time%' DATE='%date%'
Edit the ID to the correlative number if needed.
Then save the file:

Code: Select all

Ctrl + X then type Y enter
Rebuild you users for web and dns templates from the front end on the panel.
And thats it!
Hope this works

Re: Change Login Page

Posted: Fri May 12, 2017 3:13 am
by okrkmz
Hi

how can i do this on lastest version with centos 7 ?

Re: Change Login Page

Posted: Mon Jul 17, 2017 2:09 pm
by skurudo
Pretty much same, but remember there is some differencies in name of services.