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

PT-83's avatar
Level 7

How to setup multiple sites on one droplet with Laravel Forge?

I already have a digital droplet created and using it on another site. I am using laravel forge to deploy it all.

In terms of Forge, I simply added another website using the existing server which is showing me it’s functioning.

In Digital Ocean under networks, I added the other two domains @ (123.com & www.123.com). At Namecheap (where I purchased domain) I added the custom DNS ns1.digitalocean.com, 2, and 3.

But it’s still showing me a 404 when visiting the site?

Both sites are showing green on forge, but still, the second site is showing the 404. I am completely puzzled.

0 likes
2 replies
PT-83's avatar
Level 7

Both websites are listening to the same 443 ssl http2. But one is working other 404.

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name ###.com;
    server_tokens off;
    root /home/forge/###.com/public;

  

    ssl_protocols TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES256-GCM-SHA5SHA384:DHE-RS
    ssl_prefer_server_ciphers on;
    ssl_dhparam /etc/nginx/dhparams.pem;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.html index.htm index.php;

    charset utf-8;


    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

PT-83's avatar
PT-83
OP
Best Answer
Level 7

I figured this out. It was nothing to do with forge or nginx but instead my home route.

Instead of Route::get('/home', @ controller it should have been Route::get('/', @ controller) It couldn't locate the public directory causing the 404.

Please or to participate in this conversation.