I need to modify the nginx config file (/etc/nginx/app.d/server.webstation-vhost.conf) to add one line, which is for Laravel routing work correctly.
location / { try_files $uri $uri/ /index.php?$query_string; }
The problem is /etc/nginx/app.d/server.webstation-vhost.conf will ALWAYS OVERWITTEN once reboot the NAS,
Does anybody having experience how to hand this problem.
Many Thanks !
Not sure if you figured this out, but if you haven't, under that vhost conf file (
/etc/nginx/app.d/server.webstation-vhost.conf
), look for something like:Instead of
f2f0a62b-74d6-4c34-a745-d0156f13c9d6
you should see another unique id for your nginx app, create/edit the mentioneduser.conf
file (without asterisk) with the contents you need, in my case I created a file with the contents below:Then I had to restart nginx with the command
sudo synoservice --restart nginx
. And it worked.PS.: I believe it should work for any DSM v6.1 or later (maybe 6.0.x as well).
For research I used: