Support » Fixing WordPress » WordPress changes URL on admin page

  • guitarhero

    (@guitarhero)


    We have 2 projects. https://host/ – first (on Node.js), https://host/modules/ – second (on WP). Before that nginx stays as reverse-proxy. When I’m on page ‘modules’, everything is good, but when I go https://host/modules/wp-admin/, URL becomes as https://host/wp-admin, and links in menu lose prefix /modules/ as well. Somewhere are right links. What’s happening there and when should I dig?

    I tried also the settings .htaccess:

    <IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteBase /modules/
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /modules/index.php [L]
    </IfModule>  

    but it makes no results. Settings siteurl and home are https://host/modules/. I’d be glad to some advice.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Steve

    (@archersteve46)

    I also want to change my Admin URL, How can I change on my web aos tv.

    @guitarhero You mentioned that you use Nginx. Do you also use Apache to parse .htaccess files?

    guitarhero

    (@guitarhero)

    @pothi I use docker image, that contains apache2 as well.

    Okay. Nginx rules could be messed-up. Could you possibly post the Nginx rules?

    guitarhero

    (@guitarhero)

    default.conf:

    server {
      listen 80;
      server_tokens off;
    
      location / {
        return 301 https://$host$request_uri;
      }
    }

    domain.conf:

    server {
      listen 443 ssl;
      server_name domain.com;
    
      server_tokens off;
    
      *ssl settings*
    
      location /modules/ {
        proxy_pass http://modules/;
        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 $scheme;
        proxy_set_header      Host $host;
      }
    
      location / {
        proxy_pass http://platform:3000;
        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      Host $host;
      }
    }
    

    Assuming you have upstream modules; somewhere else in Nginx, everything looks normal. I can’t think of anything else to troubleshoot further.

    guitarhero

    (@guitarhero)

    Nope, there are not upstreams…

    That’s bit weird to know.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress changes URL on admin page’ is closed to new replies.