Hello all,
I'm having some issues setting up HTTPS for my dokuwiki server. It works mostly properly except for two things
1) CSS seems to be different. I'm not too worried about this right now
2) After login and logout, I get 400 errors from nginx. The reason is my browser has been redirected to
http://foo.bar.com:443/start. Nginx is seeing the input on 443 is not SSL encrypted and throwing the error. This could be happening in more places than just login and logout but I have not seen.
So my question is: why is dokuwiki's login page redirecting to http://...:443 rather than https://...? Am I missing a header that I'm supposed to be passing to the fast_cgi processes?
This is the same issue as:
http://forum.dokuwiki.org/thread/2416, which never got resolved.
Nginx Configs:
(The :80 version works fine, the :443 version does now)
server {
listen 80;
server_name foo.bar.com;
root /var/www/dokuwiki;
index index.php;
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
location / {
if (!-f $request_filename) {
rewrite ^(.*)?(.*) /doku.php?id=$1&$2 last;
rewrite ^$ /doku.php last;
}
if (-f $request_filename) {
expires 24h;
}
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/dokuwiki$fastcgi_script_name;
fastcgi_pass localhost:9000;
}
}
server {
listen 443;
server_name foo.bar.com;
root /var/www/dokuwiki;
index index.php;
ssl on;
ssl_certificate /etc/ssl/certs/dokuwiki.crt;
ssl_certificate_key /etc/ssl/private/dokuwiki.key;
ssl_client_certificate /etc/ssl/certs/cacert.pem;
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
location / {
if (!-f $request_filename) {
rewrite ^(.*)?(.*) /doku.php?id=$1&$2 last;
rewrite ^$ /doku.php last;
}
if (-f $request_filename) {
expires 24h;
}
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/dokuwiki$fastcgi_script_name;
fastcgi_pass localhost:9000;
}
}