You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pagespeed.apache.org by GitBox <gi...@apache.org> on 2022/07/06 12:03:18 UTC

[GitHub] [incubator-pagespeed-ngx] luison opened a new issue, #1753: Recommended setup for reverse-proxy

luison opened a new issue, #1753:
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1753

   Hi. We've been using mod_pagespeed for a while on our nginx reverse proxy balancer.
   
   We have now performed some important changes removing apache on the upstream and migrating rewrites rules and I am wondering if someone with a similar setup (reverse-proxy to upstreams) could point me at the right way to configure it. 
   
   The current mod_pagespeed nginx:
   - Serves all SSL domains (https). Upstream reply from port 80.
   - handles all friendly urls for various backends (/friendly-url/ served by upstream1/script?param=friendly-url)
   - serves part of the static contect directly (/assets-dir/ is also mounted on this server so no need to go to the upstream for it)
   - also acts as the reverse proxy for 2 cdn and image server domains used in the html code served 
   
   **So to clarify, from the proxy server point of view:**
   - domain.com/friendly-url -> upstream1 /script?param=friendly-url)
   - domain.com/assets-dir/image.gif -> served directly by the proxy server as a location
   - cdn.domain.com/assets-dir/anotherimage.jpg -> served directly from the same nginx as another server with static content -> /assets-dir/anotherimage.jpg (cookieless nginx server) 
   - image.domain.com/image.jpg -> upstream2/image.jpg (reverse proxy to another containers php server
   
   **Been so, for a long time our doubts on the correct setup are:**
   1. should upstream1 (different container now also running nginx) also be running mod_pagespeed, would that benefit at all if mainly serving php files there?
   2. should mod_pagespeed also be activated on "cdn.domain.com" in the main reverse proxy, so it can be handled by "domain.com"?  Can I do that  (currently log full of: No permission to rewrite 'https://cdn.domain.com/asserts-dir/bootstrap.min.css'
   
   I've been struggling to understand how to allow mod_pagespeed to rewrite also the content from our cdn served on another server of the same nginx. See: https://groups.google.com/g/mod-pagespeed-discuss/c/B5lLUa-GgsU
   
   The (new) issues that come up are that the "friendly" urls are no longer available on the upstream, so not sure if pagespeed would handle that correctly.
   
   Also had issues with extended_cache and source files updates: https://github.com/apache/incubator-pagespeed-ngx/issues/1626
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@pagespeed.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org