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

tenzan's avatar

Ploi deployment: 403 Forbidden Nginx

Hi,

I have deployed an app on Ploi.io and Ploi showed that deployment was successful. I logged into its DO droplet and made sure that migrations are in place. When accessing the IP, it's showing message 403 Forbidden Nginx.

Another interesting thing is I didn't see any log files under storage folder when I logged into a droplet.

0 likes
31 replies
Sinnbeck's avatar

Didn't you point a domain to it? If not you can access it using a test domain in the settings for the site. I doubt it will work with the ip, as it allows you multiple sites on 1 server

1 like
tenzan's avatar

@Sinnbeck Thanks again! Yeah, I was pointing a subdomain which is not showing correct IP address when I ping it. Maybe I need to wait for when DNS gets updated. By the way, is it possible to add a site without pointing a domain name in the beginning?

tenzan's avatar

@Sinnbeck Thanks! I'll try again from scratch and let you know how it goes.

Sinnbeck's avatar

@tenzan you can still do it with your current site. Only thing you need is to enable the test domain. No need to start over img

1 like
tenzan's avatar

@Sinnbeck I think I tried it also before but can't recall if I did this time or previous experiments. Anyway, I already removed the server I was having issues. At the moment, a new server is being rolled up...

Sinnbeck's avatar

@tenzan ok no worries. Luckily it's easy and fast to start over 👍

1 like
tenzan's avatar

@Sinnbeck Indeed such sort of SaaS sites are saving our times to focus on development :)

Sinnbeck's avatar

@tenzan indeed. It's so incredibly easy to use. I can recommend getting the ploi cli tool also. It makes it easy to deploy from shell if needed (or manage the servers)

1 like
tenzan's avatar

@Sinnbeck New server is fired up and when I enter just one 1 word for domain field, it's complaining The domain is not a valid hostname....

Sinnbeck's avatar

@tenzan yeah you need to give it an actual name. Personally I just use the real one, but don't point the dns until it's ready. But "fake.yourdomain.com" can also work

1 like
Sinnbeck's avatar

@tenzan is this laravel site? If it is, be sure that the path is set to /public in settings

Sinnbeck's avatar

@tenzan and the path is set correctly? And you selected laravel project in the drop down?

tenzan's avatar

@Sinnbeck For domain, I put chirper.asin.pw and path is /current/public. Yes, I selected Laravel from drop-down and the project directory is /, i.e. which was set by default.

Sinnbeck's avatar

@tenzan this sounds wrong /current/public

It should just be /public

At least that's how I always set it, as it goes from the root of the project

Sinnbeck's avatar

Seems you fixed it. Click the key:generate button in the laravel page

tenzan's avatar

@Sinnbeck Thanks. I changed to /public and re-deployed. Now I see 500 Server Error

Sinnbeck's avatar

@tenzan yeah perfect. That is laravel. Most likely just a missing key. Check you env file:)

tenzan's avatar

@Sinnbeck I already have a value for APP_KEY= in my .env.

And I don't see key:generate button in the laravel page...

Sinnbeck's avatar

@tenzan then it's fine. Check the log in there (second tab if I recall correctly). The error is clearly laravel so it's working

Or if you don't have data on there yet, set APP_DEBUG to true to see the error (turn it off at once afterwards so you don't forget)

tenzan's avatar

@Sinnbeck I see error Vite manifest not found at: /home/ploi/chirper.asin.pw/public/build/manifest.json (View: /home/ploi/chirper.asin.pw/resources/views/app.blade.php)

Sinnbeck's avatar

@tenzan ah. Either add your built assets to git. Or ssh into the server and run npm run build

I have it in my deployment script

tenzan's avatar

@Sinnbeck if possible, could you please share generic content of your deployment script?

Sinnbeck's avatar
Sinnbeck
Best Answer
Level 102

@tenzan I mostly use the default. I just added npm run build on a new line. Do that, click save, and click deploy

Like this

npm install
npm run build 
Sinnbeck's avatar

@tenzan are you sure you have npm install? It can't build without the node_modules :) see my example above

tenzan's avatar

@Sinnbeck Oops, I forgot line npm install. After adding 2 lines you showed, the issue is solved. Thanks a lot for your time!!! :)

Sinnbeck's avatar

@tenzan happy to help. Now deployments should be easier. I suggest activating zero downtime deployment

1 like

Please or to participate in this conversation.