Laravel 4.1 Deployment - Production .env.php not being recognised

后端 未结 1 1966

For some reason, my production laravel app thinks that it is in the local environment.

/var/www/appname/.env.php



        
1条回答
  •  不思量自难忘°
    2021-02-06 12:01

    For all who want to know... to solve this issue, I just edited my httpd.conf file on the production server as follows:

    SetEnv APP_ENV production
    

    Now laravel knows that the app is in production.

    If you are using nginx which I have now migrated my site to add the following where you pass scripts to the FCGI server in the active sites-available /etc/nginx/sites-available/{sitename}:

    fastcgi_param APP_ENV production;
    

    0 讨论(0)
提交回复
热议问题