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

Jorge's avatar
Level 19

Multiple sites in Forge

Hi,

I have a site running perfectly in digital ocean with forge, the problem is when I try to add another site I get this error

Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0

When I refresh the page I get another message

No input file specified.

This happens when install the repo from gitlab.com. I notice that the folder of the project I want to create disappears when installing the repo.

Thanks in advanvce for your help.

0 likes
12 replies
fideloper's avatar

Sounds like the document root (root directive inside of the Nginx configuration) is pointing to the wrong directory. I believe Forge lets you edit the Nginx config, so I'd suggest going into that site within Forge and ensuring the root file path is pointing to the document root of your site.

I'd guess this means Gitlab isn't installing correctly - as you say, the project directory disappearing would result in these errors. What you need to do is figure out why Gitlab Git isn't deploying as you suspect. Either the directory structure in your project isn't what you expect or Forge + Gitlab has issues communicating.

2 likes
Jorge's avatar
Level 19

Thank you for take the time Fideloper,

I checked the Nginx configuration and its pointing to the correct directory, when I create the site and check the url it shows me the correct php info, the problem still when installing the repo

I also tried to install a github repo with fresh laravel copy and the same result, the folder dissapears.

I don't know what's wrong

bashy's avatar

Make sure /app/storage or /storage is writeable by the web server user.

chmod -R 777 app/storage

// OR

chmod -R 775 app/storage; chgrp -R nginx app/storage
1 like
Jorge's avatar
Level 19

I tried that Bashy but still the same error.

fideloper's avatar

It could be similar to what @bashy is saying, that sounds pretty plausible.

I believe (I could be mistaken) that Forge servers run tasks via user forge.

Nginx & PHP-FPM are run as user and group forge. Applications are added in the forge users home directory (/home/forge). This means that if file permissions are an issue, the fix would be to make sure the directory where the application is going should be owned and readable/writeable by user/group "forge".

Using chgrp -R nginx app/storage won't work above, that's the wrong group to use in Forge. The app/storage directory is pretty specific, it's possible that's part of the issue, but I'd go into the server and ensure that everything is user/group forge in the /home/forge directory.

You can also ask Taylor with the Forge support. There could be something else going on, I don't have visibility into how it's all set up :D

1 like
bashy's avatar

Yeah indeed, I could solve it if I had access but it's hit and miss without knowing :)

1 like
equipc's avatar

I had the same issue a few weeks ago. I think it's due to the fact you have to approve the Gitlab connection. Try to ssh to your Gitlab server once via console to approve the remote connection. Then you will be able to deploy from Gitlab with success.

1 like
Jorge's avatar
Level 19

Mi first "app" is correctly installed with gitlab so I don't think that's the problem, and fideloper, bashy I can give you access I'll appreciate your help :)

bashy's avatar

Well, if you have something to chat on, I'll help you out. Skype/email etc

rajankarthiks's avatar

I am also having the same issue... Need help about the solution..

yolcu's avatar

Laravel Forge configures your site by default as a "laravel installation".

If you use a non-laravel site or a site where the default directory is not "/Public" you'll get the "No input file specified." error.

You therefore have to edit the nginx config file of your site and change it to the correct path.

Top Menu -> Sites -> YOUR SITE On this page go to the very bottom and look for "Edit Files" -> "Edit Nginx Configuration" Here look closely at the line that starts with "root".

root /home/forge/youdomain.com/Public <-- if this is not your folder than you should change it to the correct one.

That solves the problem

RisynOne's avatar

I just found which makes me very happy, that you can edit the site root directory in the domain/site configurations options.

When adding the domain, you have the option to change the Web Directory = public (default) to blank or "/", that will make the domain.com folder launch your index file.

Should you forget to change that though, you can go into mange your domain, go to the last tab "Meta" and change the "Web Directory" field to either blank or "/" and that will also set domain.com folder to launch your index file.

Please or to participate in this conversation.