• Resolved noop7

    (@noop7)


    I have my wordpress install sitting behind a Nginx reverse proxy. I have it configured to sit on the /blog/ filepath rather than on root. So far everything is working good after playing with the configuration a little.

    Specifically I have this in my wp-config file since my reverse proxy is using SSL:

    define('FORCE_SSL_ADMIN', true);
    if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')
           $_SERVER['HTTPS']='on';

    And to get around an odd permissions issue I had to modify a line of code in wp-includes/user.php:

    if (is_blog_admin() || is_network_admin() || empty( $_COOKIE[LOGGED_IN_COOKIE] ) )

    Needed to be changed to:

    if ( is_network_admin() || empty( $_COOKIE[LOGGED_IN_COOKIE] ) )

    And I use nginx instead of Apache, with the following configuration for hosting my wordpress backend:

    server {
      listen 80;
      server_name example.com www.example.com;
    
      access_log   /var/log/nginx/wordpress.access.log;
      error_log    /var/log/nginx/wordpress.error.log;
    
      root /var/www/wordpress;
      index index.php;
    
      location @wp {
        rewrite ^/blog(.*) /blog/index.php?q=$1;
      }
    
      location ^~ /blog {
              alias /var/www/wordpress;
              index index.php;
              try_files $uri $uri/ @wp;
    
              location ~ \.php$ {
                      include fastcgi_params;
                      fastcgi_param SCRIPT_FILENAME $request_filename;
                      fastcgi_pass 127.0.0.1:9000;
              }
      }
    }

    The issue I’m running into is that whenever I try to visit the customize appearance page I seem to run into a redirect loop. I seem to be able to access all the other pages fine. Visiting that page from the admin panel sends me off to this address: https://www.example.com/blog/wp-admin/customize.php?return=%2Fblog%2Fwp-admin%2Fthemes.php

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Redirect loop on appearance customize page only?’ is closed to new replies.