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

NGINX automated rule sync #3986

Open
jordanhenderson opened this issue Feb 19, 2025 · 2 comments
Open

NGINX automated rule sync #3986

jordanhenderson opened this issue Feb 19, 2025 · 2 comments

Comments

@jordanhenderson
Copy link

Hi,

Just wondering if there are any plans to support automatic NGINX rule synchronisation (ie. out to a set .conf file).

This would be ideal (in parallel with an automatic nginx -r reload call) to ensure WP Redirect can push redirection logic to NGINX configuration automatically, without server restart or performance degredation due to WordPress overheads.

Is there any plan for this in the works; rather than a one way export this would keep WP Redirect as a 'frontend' for these rules without needing extra manual overheads.

I am happy to provide this as a PR if this is something that is not currently planned.

@johngodley
Copy link
Owner

There are no plans for this and it's not really practical. Nginx config files are typically in a protected directory that your web server should not have access to.

@jordanhenderson
Copy link
Author

Hey John,

I've worked on low level nginx modules before, it's definitely possible for NGINX to read config from any arbitrary directory - happy to help create a module to assist here (potentially even with an API exposed to communicate between WP Redirection and NGINX itself, which would save some time in signalling between backend and frontend).

I've always felt NGINX config to be slightly inflexible compared to .htaccess in apache, however I think a good hybrid solution can be reached here.

Please feel free to reach out any time, I'd be keen to discuss this approach further if/when needed.

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