Laravel sends the session and csrf cookie in every response. That is additional trafic that's not needed. With this changes the session cookie and csrf cookie don't get resend to the client every time if they did not change (but at least once an hour to prevent client side expiring).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ubuntu 20 LTS Server Setup for Laravel | |
# Login as root user | |
sudo su - | |
# Update list of available packages | |
apt update |
Command to delete old expired cache files.
When using the file cache driver, Laravel creates the cache files but never purges expired ones. This can lead to a situation where you have a large number of unused and irrelevant cache files, especially if you do a lot of short-term caching in your system.
Serve dynamicaly generated files from Laravel from the Nginx cache.
# sudo nano /etc/nginx/sites-available/default