ello everybody, I am relatively new to AWS and recently I was trying to deploy a Laravel application into AWS Lightsail with a nginx instance. According to bitnami documentation the recommended directory for your Laravel project files is: After that you cloned your project, you need to give the web server writing permission. Trust me this step could be a nightmare if you don’t do it properly. Do not forget to include -R flag as you might face some errors like: Now you need to create a .conf file containing the application’s HTTP server block configuration : The configuration block inside the “[your-project-name]-server-block.conf” file should be something like: Similarly, you also need to create another .conf file containing the application HTTPS server block configuration : The configuration block inside the [your-project-name]-https-server-block.conf file should be something like: Finally, you need to restart the NGINX server with the following command: Congratulation!, your NGINX server is configured successfully. Note: you still to enter the database connection details in the .env file and also you need to run the following commands as well : php artisan key:generatephp artisan migrate
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners