[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-16 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-970585694


   For now I've added using the add_header for the cache control and it seems 
to show ok 
   
   I also added a header to the location directive for static files to make 
sure it's processed by nginx and not by apache. 
   
   
![image](https://user-images.githubusercontent.com/20220341/142049801-ea566918-0922-414b-9681-8a0ae8d4f809.png)
   
   I added a similar header in apache requests to differentiate to requests 
processed by apache and nginx
   
   
![image](https://user-images.githubusercontent.com/20220341/142049926-5963cfd2-ee72-4188-93be-424edb0d586f.png)
   
   Should I add etag off too? 
   
   Expires directive is gone. 
   
   Of course the 4xx error is still there. 


-- 
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-unsubscr...@pagespeed.apache.org

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




[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-15 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-969260667


   What's really puzzling me is that it's doing a shrink in this file 
   
   ```
   [Mon, 15 Nov 2021 19:42:30 GMT] [Info] [519193] 
https://subdomain.example.com/storeviewgreek/accessories/wilson-greek-flag-dampener-x-1-wr8413601.html:11170-11174:
 Shrinking image 
`https://subdomain.example.com/pub/media/catalog/product/cache/f5f3da80ad7b670245aea7e970662954/w/r/wr8413601.jpg'
 (29431 bytes) to 
`https://subdomain.example.com/pub/media/catalog/product/cache/f5f3da80ad7b670245aea7e970662954/w/r/xwr8413601.jpg.pagespeed.ic.75CddY7jwy.webp'
 (13942 bytes)
   
   ```
   
   And yet it serves it as jpg instead of webp. 


-- 
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-unsubscr...@pagespeed.apache.org

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




[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-15 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-968887356


   The file exists
   
   ```
   ll 
pub/media/catalog/product/cache/9cb80aaa700fbabda1d30deb1d8f7ff5/6/0/601313-dunlop-atp-official-tennis-balls_1.jpg
 -h 
   -rw-rw-r-- 1 sys_ psacln 11K Oct  8 18:02 
/pub/media/catalog/product/cache/9cb80aaa700fbabda1d30deb1d8f7ff5/6/0/601313-dunlop-atp-official-tennis-balls_1.jpg
   ```


-- 
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-unsubscr...@pagespeed.apache.org

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




[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-15 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-968887356


   The file exists
   
   ```
   ll 
pub/media/catalog/product/cache/9cb80aaa700fbabda1d30deb1d8f7ff5/6/0/601313-dunlop-atp-official-tennis-balls_1.jpg
 -h 
   -rw-rw-r-- 1 sys_etennism2 psacln 11K Oct  8 18:02 
/pub/media/catalog/product/cache/9cb80aaa700fbabda1d30deb1d8f7ff5/6/0/601313-dunlop-atp-official-tennis-balls_1.jpg
   ```


-- 
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-unsubscr...@pagespeed.apache.org

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




[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-15 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-969143014


   Again the typical 4xx status code
   
   
![image](https://user-images.githubusercontent.com/20220341/141827058-34b7cdb5-5be1-49d8-a149-19927f7a1027.png)
   
   Incidentally I managed to find the access_log off commands in nginx and 
reverted them to access_log on 
   
   But I still don't see any `serf` in the proxy_access_ssl_log 
   
   The above url is `200` in the logs
   
   
![image](https://user-images.githubusercontent.com/20220341/141827556-22c27f01-95de-47d1-9ef7-8c880fb51d7e.png)
   
   


-- 
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-unsubscr...@pagespeed.apache.org

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




[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-15 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-968912037


   >Yes. I´m asking because I can´t see these config in the vhos_nginx.conf 
file here #1897 (comment)
   
   I've put them in the http context which is affecting all vhosts, that's why 
you don't see it here. However the directives are indeed active from what I see 
in the pagespeed admin pages 
   
   
![image](https://user-images.githubusercontent.com/20220341/141788720-72565be7-d70e-47c5-87e0-9982f19c6234.png)
   
   
   ### /etc/nginx/nginx.conf 
   
   
   
   ```nginx
   
   #user  nginx;
   worker_processes  auto;
   
   #error_log  /var/log/nginx/error.log;
   #error_log  /var/log/nginx/error.log  notice;
   #error_log  /var/log/nginx/error.log  info;
   
   #pid/var/run/nginx.pid;
   
   include /etc/nginx/modules.conf.d/*.conf;
   
   events {
   worker_connections  1024;
   }
   
   
   http {
   include   mime.types;
   default_type  application/octet-stream;
   
   #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" 
'
   #  '$status $body_bytes_sent "$http_referer" '
   #  '"$http_user_agent" "$http_x_forwarded_for"';
   
   #access_log  /var/log/nginx/access.log  main;
   
   sendfileon;
   #tcp_nopush on;
   
   #keepalive_timeout  0;
   keepalive_timeout  65;
   #tcp_nodelayon;
   
   #gzip  on;
   #gzip_disable "MSIE [1-6]\.(?!.*SV1)";
   
   server_tokens off;
   
   include /etc/nginx/conf.d/*.conf;
   }
   
   # override global parameters e.g. worker_rlimit_nofile
   include /etc/nginx/*global_params;
   
   ```
   
   
   ### /etc/nginx/conf.d/pagespeed.conf
   
   
   
   ```nginx
   pagespeed off;
   pagespeed RewriteLevel PassThrough;
   pagespeed FileCachePath /var/ngx_pagespeed_cache;
   pagespeed FileCacheSizeKb 204800;
   pagespeed FileCacheCleanIntervalMs 360;
   pagespeed FileCacheInodeLimit 50;
   pagespeed LRUCacheKbPerProcess 8192;
   pagespeed LRUCacheByteLimit 16384;
   pagespeed CreateSharedMemoryMetadataCache "/var/ngx_pagespeed_cache/" 
51200;
   
   
   pagespeed EnableFilters recompress_images;
   pagespeed EnableFilters recompress_webp;
   pagespeed EnableFilters 
convert_jpeg_to_webp,convert_to_webp_lossless,convert_to_webp_animated;
   pagespeed Disallow *.woff;
   pagespeed Disallow *.svg;
   pagespeed Disallow *.css;
   
   pagespeed Statistics on;
   pagespeed StatisticsLogging on;
   pagespeed LogDir /var/log/ngx_pagespeed;
   pagespeed AdminPath /pagespeed_admin;
   pagespeed GlobalAdminPath /pagespeed_global_admin;
   pagespeed StatisticsPath /ngx_pagespeed_statistics;
   pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;
   pagespeed MessagesPath /ngx_pagespeed_message;
   pagespeed ConsolePath /pagespeed_console;
   pagespeed UsePerVhostStatistics on;
   pagespeed MessageBufferSize 10;
   pagespeed EnableCachePurge on;
   
   pagespeed SslCertDirectory /etc/ssl/certs;
   pagespeed FetchHttps enable,allow_self_signed;
   pagespeed RespectXForwardedProto on;
   ```
   
   
   
   Basically I wanted to globalize the settings, so various sites can use it if 
needed with a simple way like just add the location directives and enable the 
filters you want per website. Because different websites need different 
settings and this one only needs webp images conversion. Ultimately the vhosts 
configuration will enable pagespeed on a per vhost basis and activate the 
necessary filters. I've used this type of config with apache in the past and it 
worked for me so I continued with the same logic.
   
   
   Regarding your next question 
   
   > But this path is under /var/www/vhosts/subdomain.example.com/httpdocs/
   
   Well all my vhosts are under `/var/www/vhosts//httpdocs 
`
   
   But don't take the exact path literally on the log, I have to trim out some 
parts for privacy 
   
   Filesystem
   
![image](https://user-images.githubusercontent.com/20220341/141789059-6ab98b0c-359d-401e-be73-3bf4dc31b6b9.png)
   
   
   Log
   
![image](https://user-images.githubusercontent.com/20220341/141788352-0510c93a-f41e-4dac-a900-a764fab6bca0.png)
   
   
   OK based on what you said, I decided to disallow css files too explicitly to 
reduce the messages and restarted nginx 
   
   Now a bunch of images got generated as webp and served , not all but a lot 
of them 
   
   After a couple of minutes, no webp images were generated. This is very weird 
:( 
   
   Here are the messages now 
   
   
   
   ```
   [Mon, 15 Nov 2021 13:27:42 GMT] [Info] [252543] Trying to serve rewritten 
resource in-place: 

[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-15 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-968796195


   I've modified my configuration file template so that all custom directives I 
write will go directly below the command 
   
   `proxy_read_timeout` 
   
   and above any other location blocks. 
   
   Now the result is that I'm getting 404s for some images only e.g.
   
   `pub/media/xrackets_adults_bg_eng.png.pagespeed.ic.1hFd9psVc_.webp`
   
   My apache log doesn't mention anything with pagespeed in it 
   
   ` grep -ri pagespeed ../logs/access_log ../logs/access_ssl_log` 
   
yields no result so I think apache is not used in this case. 
   
   But on nginx logs I see results
   
   ```
   ../logs/proxy_access_ssl_log:222.252.xx.xxx - - [15/Nov/2021:12:11:03 +0100] 
"GET /pub/media/wysiwyg/xespa.png.pagespeed.ic.Srrf3IOYbP.webp HTTP/2.0" 404 
370 
"https://subdomain.example.com/storeviewgreek/accessories/wilson-greek-flag-dampener-x-1-wr8413601.html;
 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/95.0.4638.69 Safari/537.36"
   ../logs/proxy_access_ssl_log:222.252.xx.xxx - - [15/Nov/2021:12:11:03 +0100] 
"GET /pub/media/xrackets_adults_bg_eng.png.pagespeed.ic.1hFd9psVc_.webp 
HTTP/2.0" 404 370 
"https://subdomain.example.com/storeviewgreek/accessories/wilson-greek-flag-dampener-x-1-wr8413601.html;
 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/95.0.4638.69 Safari/537.36"
   ../logs/proxy_access_ssl_log:222.252.xx.xxx - - [15/Nov/2021:12:11:03 +0100] 
"GET 
/pub/static/version1636968163/frontend/Ioweb/etennis/el_GR/images/xloader-1.gif.pagespeed.ic.DaGwXwKN2x.webp
 HTTP/2.0" 200 40 
"https://subdomain.example.com/storeviewgreek/accessories/wilson-greek-flag-dampener-x-1-wr8413601.html;
 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/95.0.4638.69 Safari/537.36"
   ../logs/proxy_access_ssl_log:222.252.xx.xxx - - [15/Nov/2021:12:11:03 +0100] 
"GET /pub/media/xrackets_kids_bg_eng.png.pagespeed.ic.xabPGK8I2V.webp HTTP/2.0" 
404 370 
"https://subdomain.example.com/storeviewgreek/accessories/wilson-greek-flag-dampener-x-1-wr8413601.html;
 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/95.0.4638.69 Safari/537.36"
   ../logs/proxy_access_ssl_log:222.252.xx.xxx - - [15/Nov/2021:12:11:03 +0100] 
"GET /pub/media/wysiwyg/xespa.png.pagespeed.ic.Srrf3IOYbP.webp HTTP/2.0" 404 
370 
"https://subdomain.example.com/storeviewgreek/accessories/wilson-greek-flag-dampener-x-1-wr8413601.html;
 "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/95.0.4638.69 Safari/537.36"
   ../logs/proxy_access_ssl_log:222.252.xx.xxx - - [15/Nov/2021:12:11:15 +0100] 
"GET /pub/media/wysiwyg/xespa.png.pagespeed.ic.Srrf3IOYbP.webp HTTP/2.0" 404 
370 "https://subdomain.example.com/storeviewgreek/checkout/; "Mozilla/5.0 (X11; 
Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 
Safari/537.36"
   ../logs/proxy_access_ssl_log:222.252.xx.xxx - - [15/Nov/2021:12:11:15 +0100] 
"GET /pub/media/xrackets_adults_bg_eng.png.pagespeed.ic.1hFd9psVc_.webp 
HTTP/2.0" 404 370 "https://subdomain.example.com/storeviewgreek/checkout/; 
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/95.0.4638.69 Safari/537.36"
   ../logs/proxy_access_ssl_log:222.252.xx.xxx - - [15/Nov/2021:12:11:15 +0100] 
"GET /pub/media/xrackets_kids_bg_eng.png.pagespeed.ic.xabPGK8I2V.webp HTTP/2.0" 
404 370 "https://subdomain.example.com/storeviewgreek/checkout/; "Mozilla/5.0 
(X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 
Safari/537.36"
   ```
   
   ### nginx.conf
   
   
   
   ```
   #ATTENTION!
   #
   #DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
   #SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
   
   server {
   listen 135.181.xxx.xxx:443 ssl http2;
   
   server_name subdomain.example.com;
   server_name www.subdomain.example.com;
   server_name ipv4.subdomain.example.com;
   
   ssl_certificate /opt/psa/var/certificates/scfzuSka7;
   ssl_certificate_key /opt/psa/var/certificates/scfzuSka7;
   
   client_max_body_size 128m;
   
   proxy_read_timeout 3600;
   
   include 
"/var/www/vhosts/system/subdomain.example.com/conf/vhost_nginx.conf";
   
   # mailconfig
   location ~* ^/autodiscover/autodiscover\.xml$ {
   try_files $uri @mad;
   }
   location ~* ^(/\.well-known/autoconfig)?/mail/config\-v1\.1\.xml$ {
   try_files $uri @mad;
   }
   
   location  ~* ^/email\.mobileconfig$ {
   try_files $uri @mad;
   }
   
   location @mad {
   rewrite ^(.*)$ /mailconfig/ break;
   
   proxy_pass  

[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-15 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-968746800


   I struggled a bit on how to remove the location directive which precedes the 
pagespeed one and now I have this
   
   new nginx.conf
   
   
   ```
   server {
   listen 135.181.x.x:443 ssl http2;
   
   server_name subdomain.example.com;
   server_name www.subdomain.example.com;
   server_name ipv4.subdomain.example.com;
   
   ssl_certificate /opt/psa/var/certificates/scfzuSka7;
   ssl_certificate_key /opt/psa/var/certificates/scfzuSka7;
   
   client_max_body_size 128m;
   
   proxy_read_timeout 3600;
   
   # mailconfig
   location ~* ^/autodiscover/autodiscover\.xml$ {
   try_files $uri @mad;
   }
   location ~* ^(/\.well-known/autoconfig)?/mail/config\-v1\.1\.xml$ {
   try_files $uri @mad;
   }
   
   location  ~* ^/email\.mobileconfig$ {
   try_files $uri @mad;
   }
   
   location @mad {
   rewrite ^(.*)$ /mailconfig/ break;
   
   proxy_pass  http://127.0.0.1:8880;
   proxy_set_header X-Host $host;
   proxy_set_header X-Request-URI  $request_uri;
   }
   # mailconfig
   
   root "/var/www/vhosts/subdomain.example.com/httpdocs";
   access_log 
"/var/www/vhosts/system/subdomain.example.com/logs/proxy_access_ssl_log";
   error_log 
"/var/www/vhosts/system/subdomain.example.com/logs/proxy_error_log";
   
   #extension letsencrypt begin
   location ^~ /.well-known/acme-challenge/ {
   root /var/www/vhosts/default/htdocs;
   
   types { }
   default_type text/plain;
   
   satisfy any;
   auth_basic off;
   allow all;
   
   location ~ ^/\.well-known/acme-challenge.*/\. {
   deny all;
   }
   }
   #extension letsencrypt end
   
   #extension sslit begin
   
   add_header Strict-Transport-Security "max-age=15768000; 
includeSubDomains" always;
   
   #OCSP Stapling
   ssl_stapling on;
   ssl_stapling_verify on;
   
   #extension sslit end
   
   error_page 400 "/error_docs/bad_request.html";
   error_page 401 "/error_docs/unauthorized.html";
   error_page 403 "/error_docs/forbidden.html";
   error_page 404 "/error_docs/not_found.html";
   error_page 500 "/error_docs/internal_server_error.html";
   error_page 405 "/error_docs/method_not_allowed.html";
   error_page 406 "/error_docs/not_acceptable.html";
   error_page 407 "/error_docs/proxy_authentication_required.html";
   error_page 412 "/error_docs/precondition_failed.html";
   error_page 414 "/error_docs/request_uri_too_long.html";
   error_page 415 "/error_docs/unsupported_media_type.html";
   error_page 501 "/error_docs/not_implemented.html";
   error_page 502 "/error_docs/bad_gateway.html";
   error_page 503 "/error_docs/maintenance.html";
   
   location ^~ /error_docs {
   root "/var/www/vhosts/subdomain.example.com";
   }
   
   location / {
   proxy_pass https://135.181.x.x:7081;
   proxy_hide_header upgrade;
   proxy_set_header Host $host;
   proxy_set_header X-Real-IP$remote_addr;
   proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
   proxy_set_header X-Accel-Internal 
/internal-nginx-static-location;
   access_log off;
   
   }
   
   location /internal-nginx-static-location/ {
   alias /var/www/vhosts/subdomain.example.com/httpdocs/;
   internal;
   }
   
   location ~ 
^/(plesk-stat|awstats-icon|webstat|webstat-ssl|ftpstat|anon_ftpstat) {
   proxy_pass https://135.181.x.x:7081;
   proxy_hide_header upgrade;
   proxy_set_header Host $host;
   proxy_set_header X-Real-IP$remote_addr;
   proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
   proxy_set_header X-Accel-Internal 
/internal-nginx-static-location;
   access_log off;
   
   }
   
   location ~ ^/~(.+?)(/.*?\.php)(/.*)?$ {
   fastcgi_read_timeout 3600;
   alias /var/www/vhosts/subdomain.example.com/web_users/$1/$2;
   fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
   try_files $uri $fastcgi_script_name =404;
  

[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-08 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-963235129


   Well since PLESK autoconfigures most of them I'm not exactly sure about 
every detail but let me post the nginx conf and the vhost conf and maybe we can 
shed some light to what the issue is. 
   
   
   vhost.conf
   
   
   
   ```
   #ATTENTION!
   #
   #DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
   #SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
   #IF YOU REQUIRE TO APPLY CUSTOM MODIFICATIONS, PERFORM THEM IN THE FOLLOWING 
FILES:
   #/var/www/vhosts/system/subdomain.example.com/conf/vhost.conf
   #/var/www/vhosts/system/subdomain.example.com/conf/vhost_ssl.conf
   
   
   :7081 >
   ServerName "subdomain.example.com"
   ServerAlias "www.subdomain.example.com"
   ServerAlias "ipv4.subdomain.example.com"
   UseCanonicalName Off
   
   # mailconfig
   
   
   RewriteEngine On
   RewriteCond %{REQUEST_URI} 
^/autodiscover/autodiscover\.xml$ [NC,OR]
   RewriteCond %{REQUEST_URI} 
^(/\.well-known/autoconfig)?/mail/config\-v1\.1\.xml$ [NC,OR]
   RewriteCond %{REQUEST_URI} 
^/email\.mobileconfig$ [NC]
   RewriteRule ^(.*)$ 
http://127.0.0.1:8880/mailconfig/ 
[P,QSA,L,E=REQUEST_URI:%{REQUEST_URI},E=HOST:%{HTTP_HOST}]
   
   http://127.0.0.1:8880/mailconfig/;>
   RequestHeader set X-Host "%{HOST}e"
   RequestHeader set X-Request-URI 
"%{REQUEST_URI}e"
   
   
   # mailconfig
   
   DocumentRoot "/var/www/vhosts/subdomain.example.com/httpdocs"
   CustomLog 
/var/www/vhosts/system/subdomain.example.com/logs/access_ssl_log plesklog
   ErrorLog 
"/var/www/vhosts/system/subdomain.example.com/logs/error_log"
   
   
   SuexecUserGroup "sys_subdomain" "psacln"
   
   
   
   UserDir 
"/var/www/vhosts/subdomain.example.com/web_users/*"
   
   
   
   SetSysEnv PP_VHOST_ID 
"27f55b23-084b-4c81-9aef-889d453c5c7c"
   
   
   Alias "/plesk-stat" 
"/var/www/vhosts/system/subdomain.example.com/statistics"
   
   Options +Indexes
   
   
   Require valid-user
   
   Alias /webstat 
/var/www/vhosts/system/subdomain.example.com/statistics/webstat
   Alias /webstat-ssl 
/var/www/vhosts/system/subdomain.example.com/statistics/webstat-ssl
   Alias /ftpstat 
/var/www/vhosts/system/subdomain.example.com/statistics/ftpstat
   Alias /anon_ftpstat 
/var/www/vhosts/system/subdomain.example.com/statistics/anon_ftpstat
   Alias /awstats-icon /usr/share/awstats/icon
   
   SSLEngine on
   SSLVerifyClient none
   SSLCertificateFile /opt/psa/var/certificates/scfzuSka7
   SSLCACertificateFile /opt/psa/var/certificates/scfKX2i16
   
   TimeOut 3600
   
   
   
   
   SetHandler fcgid-script
   Options +ExecCGI
   
   
   
   
   SetHandler 
proxy:unix:/var/www/vhosts/system/subdomain.example.com/php-fpm.sock|fcgi://127.0.0.1:9000
   
   
   
   SSLRequireSSL
   
   Options -Includes -ExecCGI
   
   
   
   
   AuthType Basic
   AuthName "Domain statistics"
   AuthUserFile 
"/var/www/vhosts/system/subdomain.example.com/pd/d..httpdocs@plesk-stat"
   require valid-user
   
   
   Alias /error_docs 
/var/www/vhosts/subdomain.example.com/error_docs
   ErrorDocument 400 /error_docs/bad_request.html
   ErrorDocument 401 /error_docs/unauthorized.html
   ErrorDocument 403 /error_docs/forbidden.html
   ErrorDocument 404 /error_docs/not_found.html
   ErrorDocument 500 

[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-08 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-963066407


   >This last directive cover all others.
   
   OK I'm sticking with just this then
   
   >You need to clear the pagespeed cahe
   
   I cleared the cache from purge cache in pagespeed admin. 
   
![image](https://user-images.githubusercontent.com/20220341/140734946-3e2ef0f0-f137-4978-ad26-97f77ef170b6.png)
   
   > This can explain the 404, pagespeed is unable to connect because is 
refused. Take a look, the request is made as http not https
   Maybe you need to set:
   pagespeed RespectXForwardedProto on;
   
   
   I've just enabled this option 
   
   ```
   
   
   Version: 14: on
   
   Filters
   gp   Convert Gif to Png
   jp   Convert Jpeg to Progressive
   jw   Convert Jpeg To Webp
   pj   Convert Png to Jpeg
   wa   Convert animated images to WebP
   ws   When converting images to WebP, prefer lossless conversions
   hw   Flushes html
   js   Jpeg Subsampling
   rj   Recompress Jpeg
   rp   Recompress Png
   rw   Recompress Webp
   cp   Strip Image Color Profiles
   md   Strip Image Meta Data
   
   Options
 AdminPath (nap)  /pagespeed_admin
 AvoidRenamingIntrospectiveJavascript (aris)  True
 BeaconUrl (bu)   /ngx_pagespeed_beacon
 ConsolePath (ncp)/pagespeed_console
 EnableCachePurge (euci)  True
 EnableRewriting (e)  1
 FetchHttps (fhs) enable,allow_self_signed
 FileCacheCleanIntervalMs (afcci) 360
 FileCacheInodeLimit (afcl)   50
 FileCachePath (afcp) /var/ngx_pagespeed_cache
 FileCacheSizeKb (afc)204800
 GlobalAdminPath (ngap)   /pagespeed_global_admin
 GlobalStatisticsPath (ngsp)  
/ngx_pagespeed_global_statistics
 LogDir (ald) /var/log/ngx_pagespeed
 LRUCacheByteLimit (alcb) 16384
 LRUCacheKbPerProcess (alcp)  8192
 MessagesPath (nmp)   /ngx_pagespeed_message
 RespectXForwardedProto (rxfp)True
 RewriteLevel (l) Pass Through
 SslCertDirectory (assld) /etc/ssl/certs
 Statistics (ase) True
 StatisticsLogging (asle) True
 StatisticsPath (nsp) /ngx_pagespeed_statistics
   
   Domain Lawyer
 http*://*.example.com/ Auth
   
   Invalidation Timestamp: Mon, 08 Nov 2021 11:34:39 GMT (1636371279251)
   ```
   
   > Is your domain folder under some folder like http,3A or under https,3A?
   If under http,3A, optimized resources are stored herem but you are 
requesting a optimized resource under https,3A and the resource is not here, so 
404
   
   Yes they are and indeed I can see some webp files there 
   
   `ll 
/var/ngx_pagespeed_cache/v3/example.com/https,3A/,2Fsubdomain.example.com/pub/media/`
   
   ```
   catalog/
   favicon/
   icons/
   porto/
   rackets_adults_bg_eng.png,
   rackets_kids_bg_eng.png,
   revslider/
   shoes_bg.png,
   shoes_running_bg_eng.png,
   shoes_tennis_bg_eng.png,
   wysiwyg/
   xrackets_adults_bg_eng.png.pagespeed.ic.1hFd9psVc_.webp,
   xrackets_adults_bg_eng.png.pagespeed.ic.wrorOf4Pul.jpg,
   xrackets_kids_bg_eng.png.pagespeed.ic.45BNnmwr_f.png,
   xrackets_kids_bg_eng.png.pagespeed.ic.xabPGK8I2V.webp,
   xshoes_bg.png.pagespeed.ic.KR4WNpIxi0.jpg,
   xshoes_bg.png.pagespeed.ic.PqTyvlBx84.webp,
   xshoes_running_bg_eng.png.pagespeed.ic.eU8V0SXHN9.jpg,
   xshoes_running_bg_eng.png.pagespeed.ic.sEHw6g3I87.webp,
   xshoes_tennis_bg_eng.png.pagespeed.ic.elCjgJ61XN.webp,
   xshoes_tennis_bg_eng.png.pagespeed.ic.oIjD0NVeCW.png,
   
xxshoes_running_bg_eng.png,2CMic.sEHw6g3I87.webp.pagespeed.ic.lMgFnzIr9n.webp,
   ```
   
   But nope they're not getting served as webp. 
   I no longer see the error for http though 
   


-- 
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-unsubscr...@pagespeed.apache.org

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




[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-08 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-963024870


   > But you have a "fixed" part: pagespeed LoadFromFile 
"https://www.example.com/pub/media/; "/path-to-the fixed-one/pub/media/"
   
   Not always,  some paths will be rendered like this 
   `pub/static/version1636311072/frontend/./image.png `
   
   > I can´t see a pagespeed Domain http*://*.domain.com 
   
   I just added it as 
   `pagespeed Domain http*://*.subdomain.example.com;`
   
   and as 
   
   `pagespeed Domain http*://subdomain.example.com;`
   
   and as 
   
   `pagespeed Domain http*://*.example.com;`
   
but I don't see any change in the errors :( 
   
   Here's what shows in pagespeed admin in the first case `pagespeed Domain 
http*://*.subdomain.example.com;` for example
   ```
   Version: 14: on
   
   Filters
   gp   Convert Gif to Png
   jp   Convert Jpeg to Progressive
   jw   Convert Jpeg To Webp
   pj   Convert Png to Jpeg
   wa   Convert animated images to WebP
   ws   When converting images to WebP, prefer lossless conversions
   hw   Flushes html
   js   Jpeg Subsampling
   rj   Recompress Jpeg
   rp   Recompress Png
   rw   Recompress Webp
   cp   Strip Image Color Profiles
   md   Strip Image Meta Data
   
   Options
 AdminPath (nap)  /pagespeed_admin
 AvoidRenamingIntrospectiveJavascript (aris)  True
 BeaconUrl (bu)   /ngx_pagespeed_beacon
 ConsolePath (ncp)/pagespeed_console
 EnableCachePurge (euci)  True
 EnableRewriting (e)  1
 FetchHttps (fhs) enable,allow_self_signed
 FileCacheCleanIntervalMs (afcci) 360
 FileCacheInodeLimit (afcl)   50
 FileCachePath (afcp) /var/ngx_pagespeed_cache
 FileCacheSizeKb (afc)204800
 GlobalAdminPath (ngap)   /pagespeed_global_admin
 GlobalStatisticsPath (ngsp)  
/ngx_pagespeed_global_statistics
 LogDir (ald) /var/log/ngx_pagespeed
 LRUCacheByteLimit (alcb) 16384
 LRUCacheKbPerProcess (alcp)  8192
 MessagesPath (nmp)   /ngx_pagespeed_message
 RewriteLevel (l) Pass Through
 SslCertDirectory (assld) /etc/ssl/certs
 Statistics (ase) True
 StatisticsLogging (asle) True
 StatisticsPath (nsp) /ngx_pagespeed_statistics
   
   Domain Lawyer
 http*://*.subdomain.example.com/ Auth
   ```
   
   > In the log files can you see any request made with UA with "Serf" in it?
   
   I grepped 'serf' in the nginx access logs and I can see it if you mean that 
record
   
   ```
   ../logs/proxy_error_log:2021/11/08 10:42:10 [error] 1559750#0: 
[ngx_pagespeed 1.13.35.2-0] 
http://subdomain.example.com/pub/media/icons/34xNxetennis_rating_banner.png 
(connecting to:localhost):0:serf_context_run error status=111 (Connection 
refused)
   ```
   
   
   >  In the file cache (/var/ngx_pagespeed_cache) under v3 folder what you see?
   
   I can see files for my server IP and my main domain (the site is in a 
subdomain however I see only the domain part if that's correct) , I marked with 
an arrow my domain
   
   
![image](https://user-images.githubusercontent.com/20220341/140728784-22681788-9336-4726-9ceb-29e05beacca8.png)
   
   


-- 
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-unsubscr...@pagespeed.apache.org

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




[GitHub] [incubator-pagespeed-mod] ioweb-gr edited a comment on issue #1897: 4xx status code, preventing rewriting

2021-11-08 Thread GitBox


ioweb-gr edited a comment on issue #1897:
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1897#issuecomment-962983135


   I also face the same issue with 4xx status code preventing rewriting. I'm 
using the following setup 
   
   ```
   pagespeed RewriteLevel PassThrough;
   pagespeed FileCachePath /var/ngx_pagespeed_cache;
   pagespeed FileCacheSizeKb 204800;
   pagespeed FileCacheCleanIntervalMs 360;
   pagespeed FileCacheInodeLimit 50;
   pagespeed LRUCacheKbPerProcess 8192;
   pagespeed LRUCacheByteLimit 16384;
   pagespeed CreateSharedMemoryMetadataCache "/var/ngx_pagespeed_cache/" 
51200;
   
   
   pagespeed EnableFilters recompress_images;
   pagespeed EnableFilters recompress_webp;
   pagespeed EnableFilters 
convert_jpeg_to_webp,convert_to_webp_lossless,convert_to_webp_animated;
   pagespeed Statistics on;
   pagespeed StatisticsLogging on;
   pagespeed LogDir /var/log/ngx_pagespeed;
   pagespeed AdminPath /pagespeed_admin;
   pagespeed GlobalAdminPath /pagespeed_global_admin;
   pagespeed StatisticsPath /ngx_pagespeed_statistics;
   pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;
   pagespeed MessagesPath /ngx_pagespeed_message;
   pagespeed ConsolePath /pagespeed_console;
   pagespeed UsePerVhostStatistics on;
   pagespeed MessageBufferSize 10;
   pagespeed EnableCachePurge on;
   
   pagespeed SslCertDirectory /etc/ssl/certs;
   pagespeed FetchHttps enable,allow_self_signed;
   ```
   
   And also 
   
   ```
   pagespeed on;
   location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
   }
   location ~ "^/pagespeed_static/" { }
   location ~ "^/ngx_pagespeed_beacon$" { }
   location /ngx_pagespeed_statistics { allow 127.0.0.1; deny all; }
   location /ngx_pagespeed_global_statistics { allow 127.0.0.1; deny all; }
   location /ngx_pagespeed_message { allow 127.0.0.1; deny all; }
   location /pagespeed_console { allow 127.0.0.1; deny all; }
   location ~ ^/pagespeed_admin { allow 127.0.0.1; deny all; }
   location ~ ^/pagespeed_global_admin { allow 127.0.0.1; deny all; }
   ```
   
   My nginx server is working as a reverse proxy but serves static files 
directly, without passing them to apache. 
   When I enable the 
   
   `pagespeed LoadFromFile ...`
   
directive, things start working but I can't do it because my static 
resources are using a dynamic versioning system. 
   
   Therefore the path will never be the same as the filepath. 
   
   On my website I can see the following if I enable debug mode 
   
   ```
   mod_pagespeed on
   Filters:
   ah   Add Head
   cc   Combine Css
   jc   Combine Javascript
   gp   Convert Gif to Png
   jp   Convert Jpeg to Progressive
   jw   Convert Jpeg To Webp
   mc   Convert Meta Tags
   pj   Convert Png to Jpeg
   ws   When converting images to WebP, prefer lossless conversions
   db   Debug
   ec   Cache Extend Css
   ei   Cache Extend Images
   es   Cache Extend Scripts
   fc   Fallback Rewrite Css 
   if   Flatten CSS Imports
   hw   Flushes html
   ci   Inline Css
   ii   Inline Images
   il   Inline @import to Link
   ji   Inline Javascript
   js   Jpeg Subsampling
   rj   Recompress Jpeg
   rp   Recompress Png
   rw   Recompress Webp
   ri   Resize Images
   cf   Rewrite Css
   jm   Rewrite External Javascript
   jj   Rewrite Inline Javascript
   cu   Rewrite Style Attributes With Url
   cp   Strip Image Color Profiles
   md   Strip Image Meta Data
   
   Options:
   EnableRewriting (e) 1
   FileCacheInodeLimit (afcl) 50
   RunExperiment (fur) False
   StatisticsLogging (asle) True
   
   #NumFlushes0
   #EndDocument after 19760us
   #Total Parse duration  15459us
   #Total Render duration 26380us
   #Total Idle duration   4301us
   ```
   
   On the html code I see full messages like 
   
   `4xx status code, preventing rewriting of 
https://ww.example.com/pub/media/catalog/product/cache/9cb80aaa700fbabda1d30deb1d8f7ff5/w/r/wrt106300_a.jpg`


-- 
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-unsubscr...@pagespeed.apache.org

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