So you're finding that your app_dev.php
works but app.php
does not work?
I've had this happen in the past and there are a few things worth checking.
Copy the contents of
app_dev.php
intoapp.php
and see ifwww.firstproj.dev/app.php
orwww.firstproj.dev
work. If it works then you know it's not a problem with NGINX but instead a problem with your Symfony Setup.Have you created a
cache
orlogs
directory forprod
or only fordev
? Are they writable bywww-data
?Have you checked
/var/log/nginx/project_error.log
to see if any error is showing up when trying to accessapp.php
?At the top of the
app.php
file add in the lineerror_reporting(E_ALL);
. Now when you try to access the production version do you see any error?Try clearing the cache for production. Depending how you have you server setup (Are you using
ACL
orCHOWN/CHMOD
for your cache/log files?) You can run something likesudo su -u www-data php bin/console cache:clear --env prod