Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 13, 2022 07:17 am GMT

How to fix Nginx symlink caching issue

Let's assume that you have a Laravel application running through nginx and pointing to the current folder which is symlink of the latest release folder you have.

root /home/foo/domain.com.au/current/public;

If you update your symlink for the current to a new release, your application will still be point to the older release.

To resolve this, add the following lines to your nginx file after include fastcgi_params;

fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;fastcgi_param DOCUMENT_ROOT $realpath_root;

and it should look this:

nginx symlink issue fix

Now, if you change/update the symlink it should be working properly, and point to the correct release folder.


Original Link: https://dev.to/ibrarturi/how-to-fix-nginx-symlink-caching-issue-3loe

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To