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

HUGE_DICK_10_INCHES's avatar

Can't view site with IP or domain

I added a and cname for my domain and pinging it returns forge server IP. I added two sites, one for nuxt (which i didn't yet configured, just added as site and connected to git) Other one for laravel api.

I removed default site.

How can I see these two with IP address at least? When I open ip address only I can see is 404 not found... Don't even know how to navigate to these 2 sites by URL if possible?

0 likes
6 replies
bobbybouwmann's avatar

Laravel Forge sets up a nginx file that only works based on the domain. So if you for example create a site called example.com then you can only access it through that name.

If you run multiple domains, nginx can't know which site you intent to go to so it returns nothing. Both sites run under the same IP because it's the same server. So you need to be explicit by using the domain name.

If the domain name doesn't work, you need to update your DNS config so that it points to the correct IP of the server.

1 like
DaDo's avatar

brther i have the same problem have you solved it ??

Kumaravel's avatar

The following applies only to forge,

Only the default site can be accessed through the IP.

For any other sites in that machine. You can only access it using the domain name. No other way.

If you want to access it with IP. Create a site with default as the site name. And place your code in that.

For those 2 sites. You should have a domain as same as the site name. Otherwise, only one default site is possible.

2 likes
DaDo's avatar

yes brother i named the site api.example.com then in digitalocean im adding api.example.com domain with this "@" A record to the server ip address but the site wont show up

Please or to participate in this conversation.