[horde] Horde 6 on nginx

R.J.Baart at Prompt.nl R.J.Baart at Prompt.nl
Fri Oct 30 08:17:56 UTC 2026


Is this what you are looking for?

Below is my configuration of nginx which works with H6. It is probably 
not perfect. I would like to have feedback on this configuration.

I have 2 problems:

  * In combination with Thunderbird CalDAV does not work as expected. I
    think it has nothing to do with with the nginx configuration.
  * On my smartphone android I get the login page without a problem but
    the next pages will not work. Th error is "no input file specified"

My nginx configuration file:

===========================

server {
    server_name horde.domain.com;

    listen 443 ssl;
    http2 on;
    server_tokens off;

    ## Letsencrypt certificate, adjust pathname
    ssl_certificate /etc/letsencrypt/.../fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/..../privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    ##  You must change next line according to your server
    root /aa/bb/cc/horde.domain.com/web;
    index index.php;

    client_max_body_size 10m;

    # default values
    fastcgi_buffering on;
    fastcgi_buffer_size 4k;
    fastcgi_buffers 16 4k;

    rewrite_log off;
    error_log /var/log/nginx/horde.domain.com-error.log;
    access_log /var/log/nginx/horde.domain.com-access.log ;

    # optional: see 
https://www.owasp.org/index.php/List_of_useful_HTTP_headers
    add_header      strict-transport-security "max-age=31536000";
    add_header      x-frame-options    "sameorigin";
    add_header      x-xss-protection    "1; mode=block";
    add_header      x-content-type-options    "nosniff";

    location / {
       proxy_send_timeout 600s;
       proxy_read_timeout 600s;
       proxy_connect_timeout 600s;
       fastcgi_buffers 16 16k;
       fastcgi_buffer_size 32k;
       fastcgi_keep_conn       on;
       rewrite ^/Microsoft-Server-ActiveSync(.*)$ /horde/rpc.php$1 last;
       rewrite ^/[Aa]uto[dD]iscover/[Aa]uto[Dd]iscover.xml /horde/rpc.php;
       rewrite ^/.well-known/caldav /horde/rpc.php;
       rewrite ^/.well-known/carddav /horde/rpc.php;

       try_files $uri $uri/ /horde/rampage.php?$args;

       location ^~ /horde/services/ajax.php {
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          include includes/php.conf; # include fastcgi_pass and 
fastcgi_params
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       }

       location ^~ /horde/admin/config/index.php {
          fastcgi_split_path_info     ^(.+\.php)(/.+)$;
          include includes/php.conf; # include fastcgi_pass and 
fastcgi_params
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       }

       location ^~ /horde/rpc/ {
          if (!-e $request_filename){
             rewrite ^(.*)$ /horde/rpc/index.php/$1 break;
          }
          fastcgi_split_path_info     ^(.+\.php)(/.+)$;
          include includes/php.conf; # include fastcgi_pass and 
fastcgi_params
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       }

       location ~ \.php$ {
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_param PATH_INFO $fastcgi_path_info;
          fastcgi_index index.php;
          include /etc/nginx/includes/php.conf;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       }
    }

    location ^~ /.well-known/ {
       allow all;
    }
    # subdirs are: content  horde  imp  index.php
    # js  kronolith  mnemo  nag  static  themes  turba
    location ^~ /(themes|static)/ {
       expires 4w;
       add_header Cache-Control public;
    }
    location ~ /.ht {
       deny all;
    }
    location ~ /\. {
       deny all;
       access_log off;
       log_not_found off;
    }
}

server {
    server_name horde.domain.com;
    listen 80;
    server_tokens off;
    if ($host = horde.domain.com) {
       return 301 https://$host$request_uri;
    }

    return 404;
}
====================================

Op 2026-10-22 om 08:11 schreef Horst Simon:
> Hi,
>
> Has anyone successfully used Horde 6 with nginx and willing to share the
> configuration. I have nginx working with phpmyadmin but struggling to get
> horde working with nginx and have the horde config in a seperate
> configuration file not in the nginx.conf.
>
> Thanks and regards
> Horst
-- 

Cordialement,

*

R.J. Baart
Portable: +33 7 88398245

*


More information about the horde mailing list