Tyrell66's picture

Hello there,

 

I've dowloaded qnd installed a Turnkey VM with Wordpress installed. It works fine locally.

I have a HAProxy that allows some applications to be visible from the internet. It works fine too.

But when I add the Wordpress (80/443), it doesn't work (Bad Request). Webmin, Adminer & WebShell works well.

I've spend the last days searching & experimenting, but, without any luck.

 

Can someone please help me? I'm starting to loose my mind on this!

 

Thanks,

Tyrell66

Forum: 
Jeremy Davis's picture

I have no idea with HAProxy - I've never used it... But a quick google suggests that using default WordPress config may cause issues behind a reverse proxy.

Following that, my guess is that you might want to try explicitly setting WP_HOME & WP_SITEURL in your WordPress config (/var/www/wordpress/wp-config.php). I suggest setting them to something like this:

define('WP_HOME','https://www.example.com/subdirectory');
define('WP_SITEURL','https://www.example.com/subdirectory');

Where "https://www.example.com/subdirectory" is the exact path that you wish to server WordPress from. E.g. https://www.my-domain.com/wp

You'll need to restart Apache after that:

systemctl restart apache2

Hopefully that gets you going, if not, please post back. Ideally please share your Apache error log (/var/log/apache2/error.log).

Add new comment