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/03/13 13:00:13 UTC

[GitHub] [incubator-pagespeed-ngx] shorman88 opened a new issue #1631: Integrate pagespeed with Mutiple Nginx and Cloudefront

shorman88 opened a new issue #1631: Integrate pagespeed with Mutiple Nginx and Cloudefront    
URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1631
 
 
   Hello,
   
   I have two nginx running one for my website and running as origin, I'm struggling to have pagespeed working on my website domain.com.
   
   
   I'm serving assets from Cloudfront from multiple domains 
   
   
   
   **•Nginx Server 1**
   
   ```
   server {
   
          listen ip:443 ssl http2;
       server_name   domain.com;
    ...
   
   ….
   
   ….
   
   
   }
   ```
   
   ```
   server {  ## we have this because the origin server is not accessible for public
   
          
   
       listen ip:443 ssl http2;
       server_name   origin.cdndomain.com;
   
   
   
   
   location / {
                   proxy_pass         http://server2;
   
           }
   
   }
   
   ```
   
   
   •**Nginx Server 2 (origin server)**
   
    ```
   server {
           listen      8191 ;
           server_name origin.cdndomain.com;    
   
   
   
                   pagespeed on;
                   pagespeed FileCachePath /opt/nginx/cache/ngx_pagespeed_cache;
                   location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { add_header "" ""; }
                   location ~ "^/ngx_pagespeed_static/" { }
                   location ~ "^/ngx_pagespeed_beacon" { }
   
                   pagespeed Domain domain.com;
                   pagespeed Domain cdn1.cloudflaredomain.com;
   
                   pagespeed Domain cdn2.cloudflaredomain.com;
                   pagespeed Domain origin.cdndomain.com; 
   
   
                   pagespeed EnableFilters extend_cache;
                   pagespeed EnableFilters inline_images;
   
   
                   pagespeed EnableFilters rewrite_images;
                   pagespeed EnableFilters strip_image_meta_data;
   
   
                   pagespeed EnableFilters convert_gif_to_png;
                   pagespeed EnableFilters convert_png_to_jpeg;
                   pagespeed EnableFilters convert_jpeg_to_progressive;
                   pagespeed EnableFilters convert_jpeg_to_webp;
                   pagespeed EnableFilters convert_to_webp_animated;
                   pagespeed EnableFilters convert_to_webp_lossless;
   
   
                   pagespeed EnableFilters recompress_jpeg;
                   pagespeed EnableFilters recompress_png;
                   pagespeed EnableFilters recompress_webp;
                   pagespeed EnableFilters jpeg_subsampling;
   
                   pagespeed ImageRecompressionQuality 85;
   
   
                   pagespeed Statistics on;
                   pagespeed RateLimitBackgroundFetches off;
                   pagespeed StatisticsLogging on;
                   pagespeed LogDir /opt/nginx/nginx-pagspeed/logs/pagespeed;
                   pagespeed AdminPath /pagespeed_admin;
   
                   pagespeed EnableFilters debug;
                   pagespeed EnableCachePurge on;
   ```
   
   
   Can you please help me with my configuration?
   
   
   Thanks
   
   Ayman

----------------------------------------------------------------
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