WordPress behing OpnSense and hosted on FreeBSD-14.0-p6

1. To be able to correct “Too many redirection” 

Add this code to the backend pool. Services -> HAProxy -> Settings -> Virtual Service -> Backend Pools -> your backend pool -> Edit -> Advanced Mode -> Option pass-through:

#force SSL redirect redirect scheme https if !{ ssl_fc } # close open connections option http-server-close # add X-FORWARDED-FOR option forwardfor # add X-Forwarded-Proto http-request set-header X-Forwarded-Proto https if { ssl_fc }

Thanks to : https://www.moonsmile.ch/en/blog/2019/12/05/wordpress-behind-haproxy-on-opnsense/

2.To be able to correct : “Database connection problem” 

You need to configure your host as :

/** MySQL hostname */
define('DB_HOST', 'localhost:/var/run/mysql/mysql.sock');

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.