hi,

Currently using nginx and radicale, I would like to move to httpd instead.
I am a bit stuck with the configuration of httpd. I've tried the following:

httpd.conf
ext4_addr="xxx.xxx.eee.www"
chroot "/var/www"
types {
    include "/usr/share/misc/mime.types"
}
server "caldav.xx.org" {
    listen on $ext4_addr tls port 443
    tls certificate "/etc/ssl/nginx.crt"
    tls key "/etc/ssl/private/nginx.key"
    tls protocols TLSv1.2
    root "/htdocs/"
    directory { index "index.htm" }
    location "/\.ht*" { block drop }
    location "/*" {
        root "/htdocs/"
        authenticate Restricted with "/htdocs/.htpasswd"
        block return 301 "http://127.0.0.1:5232$REQUEST_URI";
   }
}

The block return 301 line is most likely wrong. Would anyone be able
to give some directions?

Cheers,


Below is the working config with nginx and the radicale config file:

nginx.conf
<snip..>
server {
    listen       443;
    server_name  caldav.xxx.org;
    root         /var/www/htdocs;
    ssl                  on;
    ssl_certificate      /etc/ssl/nginx.crt;
    ssl_certificate_key  /etc/ssl/private/nginx.key;
    ssl_session_timeout  5m;
    location ~ /\.ht {
        deny     all;
    }
    location / {
        auth_basic       "Restricted";
        auth_basic_user_file /var/www/htdocs/.htpasswd;
        try_files        $uri @radicale;
    }
    location @radicale {
        proxy_pass       http://127.0.0.1:5232/$uri;
    }
}


radicale.conf
[server]
hosts = 0.0.0.0:5232
daemon = False
pid =
ssl = False
certificate = /etc/radicale/server.crt
key = /etc/radicale/private/server.key
dns_lookup = True
base_prefix = /
realm = Password
[encoding]
request = utf-8
stock = utf-8
[well-known]
[auth]
type = None
htpasswd_filename = /etc/radicale/users
htpasswd_encryption = bcrypt
ldap_url = ldap://localhost:389/
ldap_base = ou=users,dc=example,dc=com
ldap_attribute = uid
ldap_filter =
ldap_binddn =
ldap_password =
ldap_scope = OneLevel
imap_hostname = localhost
imap_port = 143
imap_ssl = False
pam_group_membership =
courier_socket =
http_url =
http_user_parameter =
http_password_parameter =
[git]
[rights]
type = None
file = /etc/config/radicale/rights
[storage]
type = filesystem
filesystem_folder = /var/db/radicale/calendars
database_url =
[logging]
config = /etc/radicale/logging
debug = False
full_environment = False
[headers]

Reply via email to