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 2019/12/18 14:28:17 UTC

[GitHub] [incubator-pagespeed-ngx] mr-observer opened a new issue #1674: Varnish with PageSpeed module

mr-observer opened a new issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674
 
 
   If configuring the stack Nginx (SSL 443) -> Varnish (6081) -> Nginx with PageSpeed (8080), how to serve .pagespeed. rewritten files? As I see Varnish returning the page with URLs rewritten but it's not found physically, because it stays at 8080 VirtualHost that unavailable from public net.
   Any solutions to workaround this?  

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568178821
 
 
   Maybe you know that, but.... I have read that varnish don´t store things with cookies and your static assets are server with cookies.
   And I have found a site that maybe you need to take a look on it:
   https://www.getpagespeed.com/
   In their blog have articles about varnish like:
   https://www.getpagespeed.com/server-setup/varnish-static-files-cache
   
   >The problem is the forwarding of the assets from Varnish to SSL Vhost.
   >It looks like Varnish returning back only the page you joined, but not static files
   
   So if varnish don´t have stored the asset it must forward the request to the backend server and then this must reply . But seems that when a .pagespeed. request comes from varnish to the backend, magento tries to find it in filesystem before pagespeed catch it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568185747
 
 
   > In their blog have articles about varnish like:
   > https://www.getpagespeed.com/server-setup/varnish-static-files-cache
   
   This article is about caching static files on the hard drive instead of RAM, but it's not about how to cache it at all. Theoretically, it has to be cached automatically in RAM by default.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568185747
 
 
   > In their blog have articles about varnish like:
   > https://www.getpagespeed.com/server-setup/varnish-static-files-cache
   
   This article is about caching static files on the hard drive instead of RAM, but it's not about how to cache it at all. Theoretically, assets have to be cached automatically in RAM by default.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568496816
 
 
   > My bet is for a protocol issue.
   > Have you tried to do all http only?
   
   Yeah, I tried this. Got the same result with HTTP.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568517001
 
 
   Btw: this regex location doesn't work in Nginx for some reason. 
   I did put it in SSL Vhost before Varnish, but it still returning 404 while joining PageSpeed URLs. 
   
   ```
   location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
       	return 200;
   }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568020747
 
 
   The problem is the forwarding of the assets from Varnish to SSL Vhost. 
   It looks like Varnish caches only the page you joined, but not static files.
   
   This works:
   http://test.onlinemagento.com:8080/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css
   
   But this not: https://test.onlinemagento.com/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568185201
 
 
   > But seems that when a .pagespeed. request comes from varnish to the backend, magento tries to find it in filesystem before pagespeed catch it.
   
   But why it works on the server w/o varnish?
   These assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example and it works here as you can see: http://test.onlinemagento.com:6081/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567686344
 
 
   Thank you, now the domain is authorized, but :6081 Varnish side is requesting some assets over https.
   
   UPD: It looks like [link] is working, but on 443 still not found.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567604889
 
 
   It works on [link]
   but in the [link] it requests 443 domain, not 8080.
   Is there a workaround to have it under a public domain?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567455981
 
 
   I already tried all of those things, but I'm still receiving rewritten assets .pagespeed. that unavailable for the client. LoadFromFile does not help me in this case.
   
   [screen]
   
   I tried to PreserveURLs, but seems like it doesn't work: [link]
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568211429
 
 
   > As I have supposed...
   > Have you configured that:
   > [pagespeed RespectXForwardedProto on;](https://www.modpagespeed.com/doc/https_support#RespectXForwardedProto)
   
   I removed that, now the SSL Vhost trying to request backend with рort 8080 directly and by HTTРS. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568185201
 
 
   > But seems that when a .pagespeed. request comes from varnish to the backend, magento tries to find it in filesystem before pagespeed catch it.
   
   But why it works on the server w/o varnish?
   These assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567577908
 
 
   Yes. 
   [link]

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568213723
 
 
   See, the guy tried to do the same thing as me and got failed at the same рroblem, then just included it on the front SSL Vhost:
   https://github.com/apache/incubator-pagespeed-ngx/issues/1547
   
   But at the front, using РageSрeed with Varnish is nearly useless due to CРU overhead. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568211429
 
 
   > As I have supposed...
   > Have you configured that:
   > [pagespeed RespectXForwardedProto on;](https://www.modpagespeed.com/doc/https_support#RespectXForwardedProto)
   
   I removed that, now the SSL Vhost trying to request backend with рort 8080 directly and by HTTРS to get these assets. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568020747
 
 
   The problem is the forwarding of the assets from Varnish to SSL Vhost. 
   It looks like Varnish caches only the page you joined, but not static files.
   
   This one works:
   http://test.onlinemagento.com:6081/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css
   
   But this one, not: https://test.onlinemagento.com/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568496816
 
 
   > My bet is for a protocol issue.
   > Have you tried to do all http only?
   
   Yeah, I tried this. Got the same result over HTTP.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568185201
 
 
   > But seems that when a .pagespeed. request comes from varnish to the backend, magento tries to find it in filesystem before pagespeed catch it.
   
   These assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example and it works here as you can see: http://test.onlinemagento.com:6081/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568213723
 
 
   See, the guy tried to do the same thing as me and got failed at the same рroblem, then just included it on the front SSL Vhost:
   https://github.com/apache/incubator-pagespeed-ngx/issues/1547
   
   But at the front, using РageSрeed with Varnish is nearly useless. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567856397
 
 
   > Thank you, now the domain is authorized, but :6081 Varnish side is requesting some assets over https.
   
   Maybe these assets are bypassing varnish? I will say, request that varnish send to the backend w/o any change on it.
   
   > 
   > UPD: It looks like http://test.onlinemagento.com:6081/?PageSpeedFilters=+debug is working, but on 443 still not found.
   
   So now if you request directly the varnish it work, rigth?
   Then the next step is debug the comunication between ngin ssl to varnish.
   Whats happens if the nginx ssl become non ssl? For testing purposes.
   
   Ummm I tried to fecht this: 
   `https://test.onlinemagento.com/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css`
   
   and seems that is magento that tries to search a file:
   
   ```
   Unable to resolve the source file for 'frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css'
   <pre>#1 Magento\Framework\App\StaticResource->launch() called at [vendor/magento/framework/App/Bootstrap.php:257]
   #2 Magento\Framework\App\Bootstrap->run() called at [pub/static.php:13]
   </pre>
   
   
   ```
   P.D.: I´m new to this stuff, never have tried this config nor used varnish, so I´m blind in this issue and maybe I´m proposing things that don´t make sense. Sorry for that.
   
   
   
   
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567963271
 
 
   SSL host is using proxy_pass.
   This is my Vhosts:
   
   `server {
   	listen *:443 ssl http2;
   	server_name test.onlinemagento.com;
   	index index.php;
   	pagespeed off;
   
   	set $user 'ogalo';
   	set $base /home/users/$user/public_html/pub;
   	root $base;
   
   	location ~ \.php$ {
   		set $php '71';
   		include settings/fastcgi/use;
   	}
   
   	include settings/hosting/magento2;
   	include settings/hosting/locations;
   	include settings/hosting/ssl_certs;
   	include settings/security/security_headers;
   
   	location / {
           proxy_pass http://127.0.0.1:6081;
           proxy_set_header Host $http_host;
           proxy_set_header X-Forwarded-Host $http_host;
           proxy_set_header X-Real-IP $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_set_header Ssl-Offloaded "1";
           proxy_set_header X-Forwarded-Proto https;
           proxy_set_header X-Forwarded-Port 443;
           proxy_redirect http://test.onlinemagento.com:8080/ /;
           proxy_http_version 1.1;
       }
   }
   
   server {
   	listen *:8080;
   	server_name test.onlinemagento.com;
   	index index.php;
       #pagespeed off;
   
       set $user 'ogalo';
       set $base /home/users/$user/public_html/pub;
       root $base;
   
       location / {
   		try_files $uri $uri/ /index.php?$query_string;
   		add_header 'Access-Control-Allow-Origin' '*' always;
   	}
   
       location ~ \.php$ {
   		set $php '71';
   		include settings/fastcgi/use;
   	}
   
   	include settings/hosting/magento2;
   
   	include settings/pagespeed/optimize.conf;
   	pagespeed Disallow https://test.onlinemagento.com/admin/*;
   	pagespeed DownstreamCachePurgeLocationPrefix http://127.0.0.1:6081;
   	#pagespeed DownstreamCacheRebeaconingKey "fO95w6H2V9vAy5RN";
   	pagespeed Domain http://test.onlinemagento.com:8080;
   	pagespeed Domain http://test.onlinemagento.com:6081;
   	#pagespeed MapOriginDomain http://127.0.0.1 https://test.onlinemagento.com;
   	#pagespeed LoadFromFile http://test.onlinemagento.com:8080 /home/users/ogalo/public_html/;
   }`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567615798
 
 
   So, on 8080 it works: [link]
   On direct Varnish: [link] it returns domain (test.onlinemagento.com) is not authorized, while pagespeed Domain test.onlinemagento.com; is added.
   On 443 it's not found: [link]
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567963271
 
 
   SSL host is using proxy_pass.
   This is my Vhosts:
   
   [test.onlinemagento.com.zip](https://github.com/apache/incubator-pagespeed-ngx/files/3988933/test.onlinemagento.com.zip)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568213723
 
 
   See, the guy tried to do the same thing as me and got failed at the same рroblem, then just рutted it on the front SSL Vhost:
   https://github.com/apache/incubator-pagespeed-ngx/issues/1547
   
   But at the front, using РageSрeed with Varnish is nearly useless. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568020747
 
 
   The problem is the forwarding of the assets from Varnish to SSL Vhost. 
   It looks like Varnish returning back only the page you joined, but not static files.
   
   This one works:
   http://test.onlinemagento.com:6081/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css
   
   But this one, not: https://test.onlinemagento.com/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568185201
 
 
   > But seems that when a .pagespeed. request comes from varnish to the backend, magento tries to find it in filesystem before pagespeed catch it.
   
   These assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example and it works here as you can see: http://test.onlinemagento.com:6081/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css 
   
   It's still Magento.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568517001
 
 
   Btw: this regex location doesn't work in Nginx for some reason. 
   I did put it in SSL Vhost before Varnish, but it still returning 404. 
   
   ```
   location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
       	return 200;
   }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568210849
 
 
   As I have supposed...
   Have you configured that:
   [pagespeed RespectXForwardedProto on;](https://www.modpagespeed.com/doc/https_support#RespectXForwardedProto)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568517001
 
 
   Btw: this regex location doesn't work in Nginx for some reason. 
   
   ```
   location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
       	return 200;
   }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568213723
 
 
   See, the guy tried to do the same thing as me and got failed at the same рroblem, then just inluded it on the front SSL Vhost:
   https://github.com/apache/incubator-pagespeed-ngx/issues/1547
   
   But at the front, using РageSрeed with Varnish is nearly useless. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568208685
 
 
   > I can´t see it, cause you have a redirection from http to https.
   
   Oрen it in the incognito window. 
   
   > EDIT: The rationale to try this (no ssl) is that I think the protocol (http/https) is part of the key that pagespeed cache uses.
   
   I'll try.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567905708
 
 
   But when you hit varnish the asset is here, so varnish cached it.... and when you hit nginx 8080 it manages to resolve the .pagespeed. thing, no magento is involved to return the asset.
   Recap on this:
   1.- The client send a https request to nginx SSL
   2.- The nginx SSL do a http request to varnish (is a redirect or a proxy_pass?)
   3.- The varnish do a http request to the nginx 8080.
   You have tried:
   1.- Hiting nginx 8080 and it work w/o issues
   2.- Hiting varnish and it works w/o issue ( is rigth?)
   3.- Hiting nginx SSL don´t work.
   
   So the questions I see here: 
   1.- Is the nginx SSL doing a http request to varnish?  Seems that yes cause if not the non rewriten resources returns a 404 too.
   2.- So why the .pagespeed. get the 404? Maybe these resources have https when go to varnish and/or varnish send it untouched to nginx 8080? 
   3.- Why magento try to find a file with .pagespeed. ? This request sould be catched by pagespeed module and do the stuff to search it in the pagespeed cache.
   
   Have you tried my last sugestion?
   >Whats happens if the nginx ssl become non ssl? For testing purposes.
   
   Make the nginx SSL respond to the http 80 w/o redirect to the 443 and sending the request to varnish and see whats happens.
   
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568185201
 
 
   > But seems that when a .pagespeed. request comes from varnish to the backend, magento tries to find it in filesystem before pagespeed catch it.
   
   These assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example and it works here as you can see: [link]
   
   It's still Magento.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568185201
 
 
   > But seems that when a .pagespeed. request comes from varnish to the backend, magento tries to find it in filesystem before pagespeed catch it.
   
   But why it works on the server w/o varnish?
   .pagespeed. assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568291579
 
 
   My bet is for a protocol issue.
   Have you tried to do all http only?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer removed a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer removed a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568517001
 
 
   Btw: this regex location doesn't work in Nginx for some reason. 
   I did put it in SSL Vhost before Varnish, but it still returning 404 while joining PageSpeed URLs. 
   
   ```
   location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
       	return 200;
   }
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
Lofesa edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568197037
 
 
   >These assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example and it >works here as you can see: http://test.onlinemagento.com:6081/static/frontend/Sm/ogalo/pl_P/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css
   
   I can´t see it, cause you have a redirection from http to https.
   
   >These assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example and it works here as you can see: http://test.onlinemagento.com:6081/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css
   
   Yes, but you can see in it how cookies are removed. The statics assest where served with cookies, are these added by nginx SSL?
   
   Have you tried to remove the ssl? I wil say, not the nginx server in front of varnish, but w/o using ssl. 
   To discard the problem is the ssl himself.
   
   EDIT: The rationale to try this (no ssl) is that I think the protocol (http/https) is part of the key that pagespeed cache uses. 
    
   
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568020747
 
 
   The problem is the forwarding of the assets from Varnish to SSL Vhost. 
   It looks like Varnish returning back only the page you joined, but not static files.
   
   This one works:
   [link]
   
   But this one, not: 
   [link]

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
Lofesa commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568197037
 
 
   >These assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example and it >works here as you can see: http://test.onlinemagento.com:6081/static/frontend/Sm/ogalo/pl_P/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css
   
   I can´t see it, cause you have a redirection from http to https.
   
   >These assets will work with Magento if I'll turn on PageSpeed on front SSL Vhost for example and it works here as you can see: http://test.onlinemagento.com:6081/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css
   
   Yes, but you can see in it how cookies are removed. The statics assest where served with cookies, are these added by nginx SSL?
   
   Have yoy tried to remove the ssl? I wil say, not the nginx server in front of varnish, but w/o using ssl. 
   To discard the problem is the ssl himself.
    
   
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568020747
 
 
   The problem is the forwarding of the assets from Varnish to SSL Vhost. 
   It looks like Varnish caches only the page you joined, but not static files.
   
   This one works:
   http://test.onlinemagento.com:8080/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css
   
   But this one, not: https://test.onlinemagento.com/static/frontend/Sm/ogalo/pl_PL/css/A.print.css.pagespeed.cf.gWpod0Sgg1.css

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] Lofesa edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
Lofesa edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567905708
 
 
   But when you hit varnish the asset is here, so varnish cached it.... and when you hit nginx 8080 it manages to resolve the .pagespeed. thing, no magento is involved to return the asset.
   Recap on this:
   1.- The client send a https request to nginx SSL
   2.- The nginx SSL do a http request to varnish (is a redirect or a proxy_pass?)
   3.- The varnish do a http request to the nginx 8080.
   You have tried:
   1.- Hiting nginx 8080 and it work w/o issues
   2.- Hiting varnish and it works w/o issue ( is rigth?)
   3.- Hiting nginx SSL don´t work.
   
   So the questions I see here: 
   1.- Is the nginx SSL doing a http request to varnish?  Seems that yes cause if not the non rewriten resources returns a 404 too.
   2.- So why the .pagespeed. get the 404? Maybe these resources have https when go to varnish and/or varnish send it untouched to nginx 8080? 
   3.- Why magento try to find a file with .pagespeed. ? This request sould be catched by pagespeed module and do the stuff to search it in the pagespeed cache.
   
   Have you tried my last sugestion?
   >Whats happens if the nginx ssl become non ssl? For testing purposes.
   
   Make the nginx SSL respond to the http 80 w/o redirect to the 443 and sending the request to varnish and see whats happens.
   
   EDIT: Take a look at `varnishlog` this command uotput the varnish log. Is a command you must run as roor ( sudo) and it output what varnish is doing. With -w <file name> it stores the log in a file.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567865528
 
 
   I think Magento can't find it just because of Varnish that didn't cache these assets to get it back to SSL Vhost. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567963271
 
 
   SSL host is using proxy_pass.
   This is my Vhosts:
   
   [config.zip]

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer edited a comment on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer edited a comment on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-567963271
 
 
   SSL host is using proxy_pass.
   This is my Vhosts:
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-pagespeed-ngx] mr-observer commented on issue #1674: Varnish with PageSpeed module

Posted by GitBox <gi...@apache.org>.
mr-observer commented on issue #1674: Varnish with PageSpeed module
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1674#issuecomment-568208685
 
 
   > I can´t see it, cause you have a redirection from http to https.
   Oрen it in the incognito window. 
   
   > EDIT: The rationale to try this (no ssl) is that I think the protocol (http/https) is part of the key that pagespeed cache uses.
   I'll try.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services