[horde] Redirecting /horde url

Techswing33 techswing33 at gmail.com
Mon Mar 3 19:42:34 UTC 2014


Hello,

I've got Horde Groupware Webmail Edition going. I'm wanting to do two
things first remove the /horde from urls and second to ensure that any
requests to webmail1.example.com are directed to https. I've looked
over the faq and have the following /etc/httpd/conf.d/horde.conf file.
If I go to either http://webmail1.example.com or
https://webmail1.example.com I got the imp page, in the former case
the https rewrite works. On login I'm getting error 404's.

/etc/httpd/conf.d/horde.conf:
# The webmail1.example.com http secure virtual host
# Used for Horde/imp/Groupware Webmail edition
<VirtualHost *:443>
    ServerAdmin webmaster at example.com
     ServerName webmail1.example.com
     ServerAlias webmail1.example.com
Alias /horde /srv/http/webmail1/horde
DocumentRoot /srv/http/webmail1/horde/imp
     ErrorLog "/var/log/httpd/webmail1.example.com_error_log"
     CustomLog "/var/log/httpd/webmail1.example.com_access_log" common
SSLEngine on
SSLCipherSuite HIGH
SSLCertificateFile "/etc/ssl/certs/server.crt"
SSLCertificateKeyFile "/etc/ssl/private/server.key"
<Directory /srv/http/webmail1/horde/imp>
Require all granted
    Options +FollowSymLinks

    # horde.org's recommended PHP settings:
    php_admin_flag safe_mode off
    php_admin_flag magic_quotes_runtime off
    php_flag session.use_trans_sid off
    php_flag session.auto_start off
    php_admin_flag file_uploads on
    php_value session.gc_divisor 10000
    php_value session.gc_probability 1
    # Optional - required for weather block in Horde to function
    php_admin_flag allow_url_fopen on

    # If horde dies while trying to handle large email file attachments,
    #  you are probably hitting PHP's memory limit.  Raise that limit here,
    #  but use caution
    # Set to your preference - memory_limit should be at least 32M
    #  and be greater than the value set for post_max_size
    #php_value memory_limit 32M
    #php_value post_max_size 20M
    #php_value upload_max_filesize 10M

    # /usr/share/pear is needed for PEAR. /var/www/html/horde is
needed for Horde itself
    # TODO: Set an appropriate include_path, too. Might even increase
speed a bit.
    php_admin_value open_basedir
"/srv/http/webmail1/horde:/srv/http/webmail1/horde/config:/usr/share/pear:/tmp"
    php_admin_flag register_globals off
</Directory>

<Directory /srv/http/webmail1/horde/config>
    Order Deny,Allow
    Deny from all
</Directory>

# Deny access to files that are not served directly by the webserver
<DirectoryMatch
"^/srv/http/webmail1/horde/(.*/)?(config|lib|locale|po|scripts|templates)/(.*)?">
    Order Deny,Allow
    Deny from all
</DirectoryMatch>

# Deny access to the test.php files except from localhost
<LocationMatch "^/horde/(.*/)?test.php">
    Order Deny,Allow
    Deny from all
</LocationMatch>
</VirtualHost>

# The webmail1.example.com standard virtual host
# For Horde/imp/Groupware Webmail edition
# Redirects to secure
<VirtualHost *:80>
     ServerName webmail1.example.com
     ErrorLog "/var/log/httpd/webmail1.example.com_error_log"
     CustomLog "/var/log/httpd/webmail1.example.com_access_log" common
  RewriteEngine  on
  RewriteCond    %{HTTPS} !=on
  RewriteRule (.*) https://%{HTTP_HOST}
</VirtualHost>

registry.local.php
<?php
$this->applications['horde']['name'] = _("Whatever");
$this->applications['horde']['webroot'] = '/horde';
$this->applications['imp']['webroot'] = '';


More information about the horde mailing list