Ok, so I looked through my nginx config for wordpress. For a basic install, I literally just dropped the wordpress install files into the www folder created the database in a separate mariadb container, and browsed to the wp-admin/install.php to install. That was it. Initially, I didn't have to change anything in the nginx/wordpress site config.
For reverse proxy through a separate letsencrypt/nginx container, I added the following:
letsencrypt site config:
location / {
proxy_pass http://127.0.0.1:81/;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header Host $host;
}
and add the following to wordpress wp-config.php:
if ( (!empty( $_SERVER['HTTP_X_FORWARDED_HOST'])) ||
(!empty( $_SERVER['HTTP_X_FORWARDED_FOR'])) ) {
$_SERVER['HTTPS'] = 'on';
}
In the first one, change the http://127.0.0.1:81/ to your unraid ip and nginx/wordpress http port.
The second one makes sure that wordpress serves https over the http port.
Then in the wordpress gui (accessing locally through the unraid ip and nginx port) login to the admin interface, go to settings and change the server address to your custom domain address so wordpress redirects all requests to that external address.
That was it
For pretty permalinks, I had to add this to the nginx/wordpress container's site-config:
if (!-e $request_filename) {
rewrite ^.*$ /index.php last;
}
Later on, you may want to change some settings in the php.ini for certain . Currently there is no easy way, but we have a PR in process that will make it super easy. It should be merged within a week or two.