[horde] Horde dev-FRAMEWORK_6_0 on NGINX
H3ll10n Horde
horde at pcns.us
Mon Apr 22 23:42:27 UTC 2024
Quoting Horst Simon <horst.simon2 at icloud.com>:
> Hi,
>
> Has anyone Horde 6 on NGINX working and might share the configuration?
>
> Thanks and Regards,
> Horst Simon
This is what works in my setup. Don't forget the server {} setting.
add_header x-frame-options "sameorigin";
add_header x-xss-protection "1; mode=block";
add_header x-content-type-options "nosniff";
client_body_buffer_size 1m;
client_header_buffer_size 2k;
client_max_body_size 512m;
proxy_read_timeout 90s;
rewrite ^/.well-known/caldav /path/to/horde/rpc.php permanent;
rewrite ^/.well-known/carddav /path/to/horde/rpc.php permanent;
rewrite ^/principals /path/to/horde/rpc.php permanent;
location /Microsoft-Server-ActiveSync {
alias /path/to/horde/rpc.php;
fastcgi_split_path_info ^(.+.php)(/.+)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_keep_conn on;
include fastcgi_params;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SERVER_NAME $http_host;
fastcgi_pass /path/to/php;
}
location /autodiscover/autodiscover.xml {
alias /path/to/horde/rpc.php;
fastcgi_split_path_info ^(.+.php)(/.+)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_keep_conn on;
include fastcgi_params;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SERVER_NAME $http_host;
fastcgi_pass /path/to/php;
}
location /Autodiscover/Autodiscover.xml {
alias /path/to/horde/rpc.php;
fastcgi_split_path_info ^(.+.php)(/.+)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_keep_conn on;
include fastcgi_params;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SERVER_NAME $http_host;
fastcgi_pass /path/to/php;
}
location / {
try_files $uri $uri/ =404;
}
location ^~ /(static|themes)/ {
expires 1w;
add_header Cache-Control public;
}
location ~ \.php {
fastcgi_split_path_info ^(.+.php)(/.+)$;
set $path_info $fastcgi_path_info;
try_files $fastcgi_script_name =404;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_keep_conn on;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SERVER_NAME $http_host;
fastcgi_pass /path/to/php;
}
location ~*
.(?:jpe?g|gif|png|ico|cur|gz|bz2|tbz|tgz|svg|svgz|mp4|ogg|ogv|webm|htc|css|js|pdf|zip|rar|tar|txt|pl|conf)$
{
try_files $uri =404;
expires 1w;
access_log off;
add_header Cache-Control "public";
}
location ^~ /.well-known/ {
allow all;
}
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
If anybody else has something different I'm open to suggestions.
--
Mit freundlichen Gruessen
With best regards
<quote>
"Politics is supposed to be the second oldest profession. I have come to
realize that it bears a very close resemblance to the first."
</quote>
/"\
\ / ASCII Ribbon Campaign
X Against HTML Mail, vCards
/ \ and News Too
--
Pat Meredith // Network and Computer Systems Administrator
Email: horde at pcns.us | WWW : http://pcns.us
echo "ipsefAqdot/vt" | perl -pe 's/(.)/chr(ord($1)-1)/ge'
More information about the horde
mailing list