DEV Community

Discussion on: Deploy Laravel Application with Nginx on Ubuntu 18.04 on DigitalOcean

Collapse
 
maurisource profile image
Manesh

I've followed this tutorial, and there's an issue with Location definition in default.conf. You don't need to define twice try_files, neither the fast_cgi index.php lines. Nginx throws an error.

After being able to get Nginx service running, you'll face this error in your Laravel app:

failed to open stream: Permission denied in /var/www/eshop/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:107

To fix this, you need to provide proper permissions to your root folder

run this: sudo chown -R :www-data /var/www/mylaravelapp