fix vagrant #480

Merged
meaz merged 6 commits from vagrant12 into main 2024-07-12 08:56:35 +02:00
Owner

The only problem I still get it the fonts that doesn't work for some reason. I spent some time on that but couldn't find why. Especially as it is working on my home machine, so I guess a problem with nginx config...

The only problem I still get it the fonts that doesn't work for some reason. I spent some time on that but couldn't find why. Especially as it is working on my home machine, so I guess a problem with nginx config...
fede was assigned by meaz 2024-04-25 11:08:08 +02:00
muppeth was assigned by meaz 2024-04-25 11:08:08 +02:00
meaz added 3 commits 2024-04-25 11:08:09 +02:00
Contributor

The only problem I still get it the fonts that doesn't work for some reason. I spent some time on that but couldn't find why. Especially as it is working on my home machine, so I guess a problem with nginx config...

Don't know why, but it seems that disabling the use of sendfile() - by adding sendfile off; to nginx config - will fix the fonts download issue.

> The only problem I still get it the fonts that doesn't work for some reason. I spent some time on that but couldn't find why. Especially as it is working on my home machine, so I guess a problem with nginx config... Don't know why, but it seems that disabling the use of `sendfile()` - by adding `sendfile off;` to nginx config - will fix the fonts download issue.
meaz added 1 commit 2024-05-05 09:53:59 +02:00
Author
Owner

Oh true, I remember doing this a while back. I've added that, thanks @floss4good

Oh true, I remember doing this a while back. I've added that, thanks @floss4good
meaz changed title from WIP: fix vagrant to fix vagrant 2024-05-05 09:54:44 +02:00
Contributor

Speaking to myself (and for posterity):

I was tempted to think that (since only font files were affected) it would be wiser to add sendfile off; within a location block. However, knowing almost nothing about NGINX configurations I further investigated this and found out it is actually an old VirtualBox issue: when the web server (be it Apache or NGINX, maybe also others) tries to deliver static files using sendfile (a kernel feature) that were transferred to the VM using VirtualBox Shared Folders issues might occur (mainly caching issues).

NGINX has a VirtualBox headline within Pitfalls and Common Mistakes wiki page that recommends setting sendfile off when deployed in VB:

If this does not work, and you’re running NGINX on a virtual machine in VirtualBox, it may be sendfile() that is causing the trouble. Simply comment out the sendfile directive or set it to “off”.

Also, in case of Apache httpd, the docs of EnableSendfile Directive, recommend disabling the use of this feature in certain situations (including for network mounted files).

These being said, since the Vagrant box it is just a development environment, I conclude that in our case disabling sendfile at server level is a good workaround.

Speaking to myself (and for posterity): I was tempted to think that (since only font files were affected) it would be wiser to add `sendfile off;` within a `location` block. However, knowing almost nothing about NGINX configurations I further investigated this and found out it is actually [an old VirtualBox issue](https://forums.virtualbox.org/viewtopic.php?t=24905#p129089): when the web server (be it Apache or NGINX, maybe also others) tries to deliver static files using _sendfile_ (a kernel feature) that were transferred to the VM using VirtualBox Shared Folders issues might occur (mainly caching issues). NGINX has a [VirtualBox headline within _Pitfalls and Common Mistakes_](https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#virtualbox) wiki page that recommends setting sendfile off when deployed in VB: > If this does not work, and you’re running NGINX on a virtual machine in VirtualBox, it may be sendfile() that is causing the trouble. Simply comment out the sendfile directive or set it to “off”. Also, in case of Apache httpd, the [docs of EnableSendfile Directive](https://httpd.apache.org/docs/2.4/mod/core.html#enablesendfile), recommend disabling the use of this feature in certain situations (including for network mounted files). These being said, since the Vagrant box it is just a development environment, I conclude that in our case disabling sendfile at server level is a good workaround.
meaz added 1 commit 2024-05-08 08:21:01 +02:00
meaz added 1 commit 2024-07-12 08:56:26 +02:00
meaz merged commit 1e9263cc28 into main 2024-07-12 08:56:35 +02:00
meaz deleted branch vagrant12 2024-07-12 08:56:35 +02:00
meaz referenced this pull request from a commit 2024-07-12 08:56:36 +02:00
vereda referenced this pull request from a commit 2024-08-12 20:59:43 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Disroot/Website#480
No description provided.