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

NGX-865: Update Nginx/Apache Site Config #73

Closed
wants to merge 2 commits into from
Closed

NGX-865: Update Nginx/Apache Site Config #73

wants to merge 2 commits into from

Conversation

combssm
Copy link
Member

@combssm combssm commented Jun 4, 2024

Apache:

  • Also create virtualhost listening on port 8080 when use_letsencrypt is true

Nginx:

  • Have separate Nginx server blocks for ports 80 and 443 when use_letsencrypt is true. This allows nginx to proxy http (nginx) requests on port 80 to the httpd (apache) virtualhost listening on port 8080 to preserve certain characteristics about the original request. This fixes issues where .htaccess redirects using the 'HTTPS' apache special Server-Variable can not detect the original protocol.

combssm added 2 commits June 4, 2024 15:10
Add two additional pieces of logic into the server hostname block.
  - Requests to 'wp-json' are able to be proxied as if the request was made to the site url
  - Requests with the 'rest_route' query string are able to be proxied as if the request was made to the site url

All other requests to the server hostname will not be proxied as if they were made to the site url.  This prevents the entire WordPress site from being accessible over the server hostname.
Apache:
 - Also create virtualhost listening on port 8080 when use_letsencrypt is true

Nginx:
 - Have separate Nginx server blocks for ports 80 and 443 when use_letsencrypt is true.  This allows nginx to proxy http (nginx) requests on port 80 to the httpd (apache) virtualhost listening on port 8080 to preserve certain characteristics about the original request.  This fixes issues where .htaccess redirects using the 'HTTPS' apache special Server-Variable can not detect the original protocol.
@combssm combssm closed this Jun 10, 2024
@combssm combssm deleted the NGX-865 branch June 10, 2024 14:12
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

Successfully merging this pull request may close these issues.

1 participant