How to change global portal_url in old Plone 3 after the domain change?

I have an old Plone 3 on zeocluster with two clients. I changed the web domain and updated the VirtualHost path to use the new domain name in Nginx but Plone is still applying the old domain URL to every link. I can't find a way to change it. Looks like a mission impossible.

Hi!

the name is applied by VHM, can you post the Ngix rules? You've to change, for example, also the address in the virtual url. For example, did you change yoursite.com as below?

proxy_pass http://<local address, eg 127.0.0.1>:8080/VirtualHostBase/http/yoursite.com:80/Plone/VirtualHostRoot/;

VHM will use http + yoursite.com + 80 to create the new url.

Yes, I only changed here the domain from apologetyka.com to apologetyka2.com

server {
  listen 80;
  client_max_body_size 20M;
  proxy_set_header Host $http_host;
  server_name apologetyka2.com www.apologetyka2.com;
  location / {
    root /var/www/apologetyka.com/public/; # old path but it's ok, it's only a filesystem
    if (!-f $request_filename) {
      rewrite ^/(.*)$ /VirtualHostBase/https/apologetyka2.com:443/choa/VirtualHostRoot/$1;
    }
  }
  location /VirtualHostBase/ {
    proxy_pass http://plone3;
  }
}

It is port 80 but it is ok, it's behind CloudFlare "Flexible SSL" feature which is adding SSL to non SSL sites

Are you sure this config is ok? I think you've to take a look to:
https://docs.plone.org/manage/deploying/front-end/nginx.html

but I'm not an Nginx expert...

Yes, this is the correct Nginx config. It was working fine before and it is still working for another Plone site. (I am using the same Plone3 server - the same Data.fs - for two Plone sites. The one is fine. The new one is not. It is still pointing to the old domain ignoring VirtualHost path.)

Is Plone inferring the domain from the VirtualHost path or it has a variable I could change? Maybe it keeps all being cached? I restarted the zeocluster a few times, it did no help.

No, just from the VirtualHost path.

I would enable the Nginx debug and see what happen. I would disable plone caching from the control panel just to speed up debugging.

also check on /virtual_hosting/manage_edit that there are not static mappings.

Hmm, all is fine now. I haven't changed anything. Maybe the cache has expired right now. Thank for help anyway. :slight_smile: