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

Dmealy's avatar

Changing web directory to current/public -> nginx fail

[Problem solved - posting to share solution and see if others know why this happened]

When moving a freshly installed site from Forge to Envoyer, I changed the web directory in Forge to /current/public on the Forge site details -> Meta page, per instructions. This caused nginx to fail to load the /etc/nginx/sites-enabled/mysite.com config file.

The errors were on lines 44 and 53, and the problem was Forge (Envoyer?) had changed the line:

fastcgi_param SCRIPT_FILENAME $document_root;

to

fastcgi_param SCRIPT_FILENAME $document_root  /home/forge/mysite.com/current/public;

After removing the site string and putting the line back the way it had been, nginx started fine and the site appeared as expected.

So, why would Forge/Envoyer write that site string into the fastcgi_param line? I'd rather not have to edit these files every time a site is moved to Envoyer.

0 likes
0 replies

Please or to participate in this conversation.