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

johncarmackfan95's avatar

Cannot change "default" site

Hello, I tried following the advice of this other thread: https://laracasts.com/discuss/channels/forge/change-default-site

Unfortunately this method no longer seems to work, and just I get an error that says this:

Nginx configuration reported the following errors. Please fix them and try again.

emerg a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/[sitename]:5

The "default" site is deleted, and only my actual website exist on this server. Yet accessing the website via IP does not work.

I appreciate any insight into this.

0 likes
1 reply
johncarmackfan95's avatar
Level 1

I just solved it on my own, but for whoever is wondering... There is a file called /etc/nginx/sites-enabled/000-catch-all which contains the 'default_server' flag on the listen 80 line. Get into the server with SSH and remove the 'default_server' flag and save it (you will need sudo access.) After that you will be able to do the fix outlined in the linked thread above. Alternatively, just change the nginx config of the default site before deleting it.

Please or to participate in this conversation.