Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

pdellepiane's avatar

Change "default" site

Hello, I just created a new server in Forge. This server comes with a default site. I deleted it and created a new one with the domain name of the site. I can't change the DNS of the domain yet cause first I need to test if the site is well configured and that works perfectly. So, how can I make the IP of this server point to that new site I created?

Thanks in advance!

0 likes
6 replies
ejdelmonico's avatar

I think maybe either I don't get your question or you are not understanding DNS. What you called your site in Forge has nothing to do with DNS settings. For DNS, you point your domain to the VM IP address that was assigned on creation of the Forge server. The nginx config will point to whatever you named your site in Forge. You can check your nginx config by selecting the mange site in Forge. Then, edit files dropdown.

You can fully test the site without SSL by accessing the assigned IP address in the browser.

1 like
pdellepiane's avatar

@ejdelmonico I might explained wrong my issue. I know that Forge has nothing to do with DNS, obviously both are totally different things.

I will try to explain again my issue, and then I will explain the solution I found, just in case someone needs it.

My client has an old website example.com and he told me to develop a new website so I've done that. Now, I need to point the domain to the new server of the new website.

In this new server, which I created with Forge in Digital Ocean, I deleted the default site that creates when I create the server. I did this because I wanted the folder of the site to be called as the domain of the website: example.com. So after that I created a new site with that name. The problem is that, I needed to test the website to make sure everything works well before changing the IP of the domain and I didn't know how to test the website. If I used the IP to launch the new server, because there was no default site, it just showed me an nginx error.

So, to be able to test it, I needed to edit the nginx configuration file on the site panel in Forge.

From this:

listen 80;
listen [::]:80;

To this:

listen 80 default_server;
listen [::]:80 default_server;

That solved my issue and made that site as the default site.

Hope I explained well the problem and hope it helps someone in the future.

16 likes
tsurrette's avatar

Thank you! I had the same problem and your solution worked perfectly. It seems simple, but it was not obvious to me until I saw your post.

alexh's avatar

@pdellepiane thanks for your documentation!! Do you have a suggestions how to test it with two sites before changing the DNS records?

drehimself's avatar

Had the same scenario as you, your solution works great. Thanks!

Please or to participate in this conversation.