Monday, June 13, 2022
HomeWordPress Developmentproxy - 404 when saving settings

proxy – 404 when saving settings


I’ve 2 servers.

Server B hosts a WordPress set up (DigitalOcean Market 1 click on set up).

Server A hosts instance.com.
The weblog is accessed at instance.com/weblog due to Apache proxypass:

        <Location "/weblog">
                  ProxyAddHeaders On
                  ProxyPass https://10.110.0.3
                  ProxyPassReverse https://10.110.0.3
                  Header add Entry-Management-Enable-Origin "*"                  
                  RequestHeader set X-Forwarded-Proto "https"
                  RequestHeader set X-Forwarded-Port "443"
        </Location>

in wp-config.php I’ve set

if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
        $_SERVER['HTTPS'] = 'on';
}

outline('WP_HOME','https://instance.com/weblog');
outline('WP_SITEURL','https://instance.com/weblog');

Every thing works wonderful however saving the settings.
I can see that the shape is submitted to the wrong URL:

https://instance.com/wp-admin/options-general.php?settings-updated=true

as a substitute of

https://instance.com/weblog/wp-admin/options-general.php?settings-updated=true

How do I appropriate this concern?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments