How to add a second domain name for the same nextlcoud instance?

I have a nextcloud instance hosted on a local server I keep in my apartment closet.

I originally set it up to be accessed by the domain

This is fine and i would like to keep this, but I have recently made myself a new professional website at I have a live folder for my resumes at that I would like to be able to link and appear to the user as coming from

I have already routed my DNS to point to my home server IP address. And I have already edited the Nextcloud instance’s config.php file to include:

‘trusted_domains’ =>
array (
0 => localhost,
1 => ‘’,
2 => '’,

And I’ve also copied the file in nginx/sites-available and nginx/sites-enabled over and changed out the references to to, but neither works.

When I go to it goes the proper website but the url in the browser displays and I don’t want it to do that because I want to create as consistent a branding between the website, the resumes, and the server folder where my live resumes are held.

Also will doing this mean I have to add a second SSL cert?

Okay I found the problem. The issue was I also needed to change the conf files in nginx/conf.d

It works now! Yay!

I think it would be useful if you would mention what exactly you did.