Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update Nginx Reverse Proxy Configuration for Improved iOS Compatibility #10809

Closed
wants to merge 3 commits into from

Conversation

MFYDev
Copy link

@MFYDev MFYDev commented Jul 3, 2024

Introduction

I encountered an issue with the current Nginx reverse proxy configuration in the documentation, which prevented videos from playing on iOS clients. After troubleshooting, I found a solution and would like to propose an update to improve the documentation.

Issue Description

Related issue: #10777

The initial configuration provided in the documentation did not support video playback on iOS devices. The videos failed to load, and I did not receive any specific error messages in the logs.

Solution

The following changes resolved the issue:

  • Disabled proxy_buffering to avoid issues with video streaming.
  • Adjusted buffer sizes with proxy_buffer_size, proxy_busy_buffers_size, and proxy_buffers.
  • Enabled proxy_force_ranges to ensure proper handling of byte-range requests, which is crucial for video playback.
  • Extended timeouts (proxy_send_timeout, proxy_read_timeout, client_body_timeout, keepalive_timeout) to prevent interruptions during large file uploads or long video streams.

Conclusion

This updated configuration resolves the issue of video playback on iOS clients and improves overall performance. I encourage the maintainers to review and test these changes and consider updating the documentation to assist others who might face similar challenges.

Thank you for your consideration.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 3, 2024
docs/docs/administration/reverse-proxy.md Outdated Show resolved Hide resolved
Comment on lines +43 to +47
proxy_buffering off;
proxy_buffer_size 16k;
proxy_busy_buffers_size 24k;
proxy_buffers 64 4k;
proxy_force_ranges on;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaik with proxy_buffering off; none of the other proxy_ directives have any effect.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I'm saying is that with buffering off, there's no need to set any buffer sizes since those aren't used.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, but what happened to me is also weird. I just tested on my own webserver, with only proxy_buffering off; The video content directly went blank on my IOS client, and adding the rest of it make the video can play again.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to investigated in my nginx, none of my nginx config set proxy buffers anywhere else. So I myself don't know why it is behaving like this, I will follow your advice. If it has too much confusion I can drop the PR

@MFYDev MFYDev requested a review from bo0tzz July 3, 2024 15:18
@MFYDev MFYDev changed the title Update Nginx Reverse Proxy Configuration for Improved iOS Compatibility docs: Update Nginx Reverse Proxy Configuration for Improved iOS Compatibility Jul 3, 2024
@MFYDev MFYDev closed this by deleting the head repository Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants