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

Asking for Help: Nginx Configuration for Rewrites #1264

Open
danielslyman opened this issue Apr 3, 2024 · 2 comments
Open

Asking for Help: Nginx Configuration for Rewrites #1264

danielslyman opened this issue Apr 3, 2024 · 2 comments

Comments

@danielslyman
Copy link

Hello guys,

I would like to host imgproxy and have several websites serve optimized images. As far as I understand I would need to change the original URLs to point to the imgproxy instance and fetch the image from the origin. What is the recommended way of implementing this? I so far was unable to figure out how to create a nginx rewrite rule that simply works. Could someone help me out?

@routehero
Copy link

routehero commented Apr 5, 2024

Here's an haproxy path-rewrite:

^(.*) /_/plain/http://origin.address/\1

@danielslyman
Copy link
Author

Thanks but I am just looking to implement this for WordPress sites that I'm running on nginx. There must be a way to easily rewrite the requests or am I mistaken?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants