apache / incubator-pagespeed-ngx

Automatic PageSpeed optimization module for Nginx
http://ngxpagespeed.com/
Apache License 2.0
4.37k stars 363 forks source link

Pagespeed not combining .css #1549

Open AnonDev1312 opened 6 years ago

AnonDev1312 commented 6 years ago

I'm struggling to get page speed modules to work on this test site: https://www.ni-dieu-ni-maitre2.com/tshirt-evolution-barcode-0016026448

Some other mods are working correctly like insert_dns_prefetch and collapse_whitespace

I'm a novice with Linux stuff but I did a lot of trials and errors to try to get it to work myself... But I need help :(

.rewrite

# Google  Page Speed Configurations  read more about it from https://developers.google.com/speed/pagespeed/module/system
pagespeed FileCachePath  "/var/cache/nginx/";
pagespeed FileCacheSizeKb            102400;
pagespeed FileCacheCleanIntervalMs   3600000;
pagespeed FileCacheInodeLimit        500000;
# LRU Cache
pagespeed LRUCacheKbPerProcess     8192;
pagespeed LRUCacheByteLimit        16384;

pagespeed UsePerVhostStatistics on;

#Use memcached servers
#pagespeed MemcachedServers "host1:port1,host2:port2,host3:port3";

# Purge Cache
pagespeed EnableCachePurge off;

pagespeed FetchWithGzip on;
pagespeed HttpCacheCompressionLevel 9;

# Added for per vhost coontrol
pagespeed RewriteLevel PassThrough;

#pagespeed Domain *.ni-dieu-ni-maitre2.com;
#pagespeed Domain scripts.ni-dieu-ni-maitre2.com;

pagespeed EnableFilters combine_css;
#pagespeed EnableFilters combine_javascript;
pagespeed EnableFilters inline_javascript;
pagespeed EnableFilters inline_css;
pagespeed EnableFilters make_google_analytics_async;
pagespeed EnableFilters collapse_whitespace;
pagespeed EnableFilters rewrite_css;
pagespeed EnableFilters insert_dns_prefetch;
#pagespeed EnableFilters lazyload_images;
pagespeed EnableFilters local_storage_cache;
pagespeed EnableFilters outline_css;
#pagespeed EnableFilters outline_javascript;
pagespeed EnableFilters prioritize_critical_css;
pagespeed EnableFilters resize_mobile_images;
pagespeed EnableFilters resize_rendered_image_dimensions;
pagespeed EnableFilters sprite_images;
pagespeed EnableFilters remove_quotes;
pagespeed EnableFilters dedup_inlined_images;
#pagespeed EnableFilters convert_jpeg_to_webp;  #causes 404 errors
pagespeed EnableFilters inline_images;
pagespeed EnableFilters rewrite_javascript;
#pagespeed LoadFromFile "https://scripts.ni-dieu-ni-maitre2.com/"                        "/home/ndnmdev/public_html/scripts/";

domain conf:

#:nginx:Nginx+ PHP-FPM Default  Stand Alone:2.0:
server {
    listen    144.217.68.82:443 ssl http2 ;
    server_name  ni-dieu-ni-maitre2.com www.ni-dieu-ni-maitre2.com;
    root /home/ndnmdev/public_html;
    index index.php index.php5 index.php4 index.php3 index.perl index.pl  index.cgi  index.phtml index.shtml index.xhtml index.html index.htm $

    ssl on;
    ssl_certificate /usr/local/nginx/conf/ssl.cert.d/ni-dieu-ni-maitre2.com_cert;
    ssl_certificate_key /usr/local/nginx/conf/ssl.key.d/ni-dieu-ni-maitre2.com_key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;
    ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-A$
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout  5m;

    #.............. Cpnginx OCSP stapling protection for security start ....................
    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_trusted_certificate /usr/local/nginx/conf/ssl.ca.d/ni-dieu-ni-maitre2.com_ca-bundle;
    resolver 127.0.0.1 8.8.8.8 4.2.2.1 8.8.4.4 4.2.2.2  valid=300s;
    resolver_timeout 5s;
    #.............. Cpnginx OCSP stapling protection for security end....................

    location = /favicon.ico {
        log_not_found off;
    }

    access_log /usr/local/apache/domlogs/ni-dieu-ni-maitre2.com-bytes_log bytes_log buffer=32k flush=5m;
    access_log /usr/local/apache/domlogs/ni-dieu-ni-maitre2.com-ssl_log combined buffer=32k flush=5m;

    referer_hash_bucket_size 512;
    # Run Staic  file directly from nginx
    location ~* ^.+.(gif|ico|zip|tgz|gz|rar|bz2|iso|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mp3|ogv|ogg|flv|swf|mpeg|mpg|mpeg4|mp4|av$
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public, must-revalidate, proxy-revalidate";
    }
    keepalive_requests 100;
    keepalive_timeout 60s;
    autoindex on;
    # Disable direct access to .ht files and folders
    location ~ /\.ht {
          deny all;
    }
    # Access all cpanel services
    location ~* ^/(cpanel|webmail|whm|bandwidth|img-sys|java-sys|mailman/archives|pipermail|sys_cpanel|cgi-sys|mailman) {
        proxy_pass   http://144.217.68.82:9080;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location ~ \.php$ {
        try_files $uri =404;
        fastcgi_pass unix:/opt/cpanel/ea-php70/root/usr/var/run/php-fpm/ndnmdev.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include /usr/local/nginx/conf/fastcgi_params;

        }

    # Enable google Page speed
    pagespeed on;
    pagespeed RespectVary on;
    # Ensure requests for pagespeed optimized resources go to the pagespeed handler  and no extraneous headers get set.
    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; }
    # filters
    pagespeed RewriteLevel CoreFilters;
    pagespeed PreserveUrlRelativity on;
    pagespeed DisableFilters rewrite_css,rewrite_javascript,combine_css,inline_css,rewrite_images;
    pagespeed EnableFilters fallback_rewrite_css_urls;

    # Map domain works as a  cdn
    pagespeed Domain https://www2.ni-dieu-ni-maitre2.com;

    # Map Original Domains
    pagespeed MapOriginDomain origin_to_fetch_from origin_specified_in_html [host_header];

    # Respect froned Proxy
    pagespeed RespectXForwardedProto on;
    # Allow Let's Encrypt client authentication - letsencrypt.org RFC 5785
    location ~ /.well-known { allow all; }

    location / {
        include /usr/local/nginx/conf/vhost.ssl.d/ni-dieu-ni-maitre2.com.rewrite;
        client_max_body_size    2000m;
        client_body_buffer_size 512k;
        try_files $uri $uri/ /index.php?$args;

    }
    # include /usr/local/nginx/conf/vhost.ssl.d/ni-dieu-ni-maitre2.com.include;

}

server {
    listen    144.217.68.82:443 ssl http2 ;
    server_name cpanel.ni-dieu-ni-maitre2.com whm.ni-dieu-ni-maitre2.com webmail.ni-dieu-ni-maitre2.com webdisk.ni-dieu-ni-maitre2.com cpcalen$
    ssl on;
    ssl_certificate /usr/local/nginx/conf/ssl.cert.d/ni-dieu-ni-maitre2.com_cert;
    ssl_certificate_key /usr/local/nginx/conf/ssl.key.d/ni-dieu-ni-maitre2.com_key;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout  5m;
    access_log off;
    location / {
            location ~ /.well-known{
                root /home/ndnmdev/public_html;
            }
        proxy_pass   https://127.0.0.1:9443;
        proxy_set_header   Host   $host;
        proxy_set_header   X-Real-IP  $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

update: I managed to get access to pagespeed_admin and I noticed a couple of high numbers here:

active_expensive_operations 0 0
cache_backend_hits 1071 1
cache_backend_misses 369 1
cache_batcher_coalesced_gets 0 0
cache_batcher_dropped_gets 0 0
cache_batcher_queued_gets 0 0
cache_deletes 0 0
cache_expirations 1 1
cache_extensions 0 0
cache_fallbacks 0 0
cache_flush_count 0 0
cache_flush_timestamp_ms 0 0
cache_hits 1 1
cache_inserts 331 1
cache_misses 1439 1
cache_time_us 138031 1
central_controller_reconnect_time_ms 0 0
child_shutdown_count 0 0
compressed_cache_compressed_size 135209 1
compressed_cache_corrupt_payloads 0 0
compressed_cache_original_size 146926 1
converted_meta_tags 13 1
critical_css_beacon_filter_script_added_count 0 0
critical_css_no_beacon_due_to_missing_data 0 0
critical_css_skipped_due_to_charset 0 0
critical_images_beacon_filter_script_added_count 3 1
critical_images_expired_count 0 0
critical_images_not_found_count 0 0
critical_images_valid_count 0 0
css_combine_opportunities 0 0
css_elements_moved 0 0
css_file_count_reduction 0 0
css_filter_blocks_rewritten 61 1
css_filter_fallback_failures 0 0
css_filter_fallback_rewrites 0 0
css_filter_parse_failures 0 0
css_filter_rewrites_dropped 0 0
css_filter_total_bytes_saved 4286 1
css_filter_total_original_bytes 21057 1
css_filter_uses 736 1
css_imports_to_links 0 0
current_expensive_operations 0 0
current_fetch_queue_size 0 0
domain_rewrites 0 0
downstream_cache_purge_attempts 0 0
file_cache_bytes_freed_in_cleanup 0 0
file_cache_cleanups 0 0
file_cache_deletes 0 0
file_cache_disk_checks 0 0
file_cache_evictions 0 0
file_cache_hits 0 0
file_cache_inserts 0 0
file_cache_misses 0 0
file_cache_skipped_cleanups 0 0
file_cache_started_cleanups 0 0
file_cache_write_errors 0 0
flatten_imports_charset_mismatch 0 0
flatten_imports_complex_queries 0 0
flatten_imports_invalid_url 0 0
flatten_imports_limit_exceeded 0 0
flatten_imports_minify_failed 0 0
flatten_imports_recursion 0 0
font_service_input_resource_hit 0 0
font_service_input_resource_miss 0 0
font_service_input_resource_recent_fetch_failure 0 0
font_service_input_resource_recent_uncacheable_failure 0 0
font_service_input_resource_recent_uncacheable_miss 0 0
google_analytics_page_load_count 13 1
google_analytics_rewritten_count 0 0
html_worker_queue_depth 0 0
http_approx_header_bytes_fetched 7475 1
http_bytes_fetched 0 0
http_fetches 325 1
image_file_count_reduction 0 0
image_inline 0 0
image_norewrites_high_resolution 0 0
image_ongoing_rewrites 0 0
image_resized_using_rendered_dimensions 480 1
image_rewrite_latency_total_ms 0 0
image_rewrite_total_bytes_saved 0 0
image_rewrite_total_original_bytes 0 0
image_rewrite_uses 0 0
image_rewrites 0 0
image_rewrites_dropped_decode_failure 0 0
image_rewrites_dropped_intentionally 0 0
image_rewrites_dropped_mime_type_unknown 0 0
image_rewrites_dropped_nosaving_noresize 0 0
image_rewrites_dropped_nosaving_resize 0 0
image_rewrites_dropped_server_write_fail 0 0
image_webp_alpha_timeouts 0 0
image_webp_conversion_gif_animated_timeouts 0 0
image_webp_conversion_gif_timeouts 0 0
image_webp_conversion_jpeg_timeouts 0 0
image_webp_conversion_png_timeouts 0 0
image_webp_opaque_timeouts 0 0
image_webp_rewrites 0 0
in_place_oversized_opt_stream 0 0
in_place_uncacheable_rewrites 0 0
inserted_ga_snippets 0 0
instrumentation_filter_script_added_count 0 0
ipro_not_in_cache 45 1
ipro_not_rewritable 362 1
ipro_recorder_dropped_due_to_load 0 0
ipro_recorder_dropped_due_to_size 0 0
ipro_recorder_failed 39 1
ipro_recorder_inserted_into_cache 6 1
ipro_recorder_not_cacheable 0 0
ipro_recorder_resources 45 1
ipro_served 1 1
javascript_blocks_minified 0 0
javascript_did_not_shrink 0 0
javascript_failed_to_write 0 0
javascript_libraries_identified 0 0
javascript_minification_disabled 0 0
javascript_minification_failures 0 0
javascript_minify_uses 0 0
javascript_reducing_minifications 0 0
javascript_total_bytes_saved 0 0
javascript_total_original_bytes 0 0
js_file_count_reduction 0 0
low_priority_worked_queue_depth 0 0
lru_cache_deletes 0 0
lru_cache_hits 0 0
lru_cache_inserts 0 0
lru_cache_misses 0 0
memcache_error_burst_size 0 0
memcache_last_error_checkpoint_ms 0 0
memcache_timeouts 0 0
memcached_async_deletes 0 0
memcached_async_hits 0 0
memcached_async_inserts 0 0
memcached_async_misses 0 0
memcached_blocking_deletes 0 0
memcached_blocking_hits 0 0
memcached_blocking_inserts 0 0
memcached_blocking_misses 0 0
named_lock_rewrite_scheduler_locks_held 0 0
not_cacheable 0 0
num_cache_control_not_rewritable_resources 1032 1
num_cache_control_rewritable_resources 1 1
num_conditional_refreshes 0 0
num_css_inlined 0 0
num_css_not_used_for_critical_css_computation 0 0
num_css_used_for_critical_css_computation 0 0
num_deadline_alarm_invocations 0 0
num_dedup_inlined_images_candidates_found 0 0
num_dedup_inlined_images_candidates_replaced 0 0
num_fallback_responses_served 0 0
num_fallback_responses_served_while_revalidate 0 0
num_flushes 15 1
num_js_inlined 0 0
num_local_storage_cache_candidates_added 0 0
num_local_storage_cache_candidates_found 104 1
num_local_storage_cache_candidates_removed 0 0
num_local_storage_cache_stored_css 0 0
num_local_storage_cache_stored_images 26 1
num_local_storage_cache_stored_total 26 1
num_proactively_freshen_user_facing_request 0 0
num_resource_fetch_failures 325 1
num_resource_fetch_successes 0 0
num_rewrites_abandoned_for_lock_contention 0 0
page_load_count 0 0
pcache_cohorts_beacon_cohort_deletes 0 0
pcache_cohorts_beacon_cohort_hits 15 1
pcache_cohorts_beacon_cohort_inserts 5 1
pcache_cohorts_beacon_cohort_misses 6 1
pcache_cohorts_dependencies_cohort_deletes 0 0
pcache_cohorts_dependencies_cohort_hits 0 0
pcache_cohorts_dependencies_cohort_inserts 0 0
pcache_cohorts_dependencies_cohort_misses 0 0
pcache_cohorts_dom_deletes 0 0
pcache_cohorts_dom_hits 14 1
pcache_cohorts_dom_inserts 16 1
pcache_cohorts_dom_misses 6 1
popularity_contest_num_rewrites_awaiting_retry 0 0
popularity_contest_num_rewrites_running 0 0
popularity_contest_queue_size 0 0
purge_cancellations 0 0
purge_contentions 0 0
purge_file_parse_failures 0 0
purge_file_stats 0 0
purge_file_write_failures 0 0
purge_file_writes 0 0
purge_index 0 0
purge_poll_timestamp_ms 0 0
queued_expensive_operations 0 0
redis_async_deletes 0 0
redis_async_hits 0 0
redis_async_inserts 0 0
redis_async_misses 0 0
redis_blocking_deletes 0 0
redis_blocking_hits 0 0
redis_blocking_inserts 0 0
redis_blocking_misses 0 0
redis_cluster_redirections 0 0
redis_cluster_slots_fetches 0 0
resource_404_count 0 0
resource_fetch_construct_failures 0 0
resource_fetch_construct_successes 0 0
resource_fetches_cached 0 0
resource_url_domain_acceptances 1642 1
resource_url_domain_rejections 1183 1
rewrite_cached_output_hits 1018 1
rewrite_cached_output_missed_deadline 932 1
rewrite_cached_output_misses 1468 1
rewrite_worker_queue_depth 0 0
serf_fetch_active_count 0 0
serf_fetch_bytes_count 0 0
serf_fetch_cancel_count 0 0
serf_fetch_cert_errors 0 0
serf_fetch_failure_count 0 0
serf_fetch_request_count 0 0
serf_fetch_time_duration_ms 0 0
serf_fetch_timeout_count 0 0
shm_cache_deletes 0 0
shm_cache_hits 0 0
shm_cache_inserts 0 0
shm_cache_misses 0 0
show_ads_api_replaced_for_async 0 0
show_ads_snippets_converted 0 0
show_ads_snippets_not_converte 0 0
slurp_404_count 0 0
statistics_404_count 0 0
stdio_fs_outstanding_ops 0 0
stdio_fs_slow_ops 0 0
stdio_fs_total_ops 0 0
successful_downstream_cache_purges 0 0
total_page_load_ms 0 0
url_input_resource_hit 0 0
url_input_resource_miss 325 1
url_input_resource_recent_fetch_failure 707 1
url_input_resource_recent_uncacheable_failure 0 0
url_input_resource_recent_uncacheable_miss 0 0
url_trim_saved_bytes 0 0
url_trims 0 0

77% of resources not rewritable? http://prntscr.com/j2119v

oschaaf commented 6 years ago

The 404's for webp images you mention are a bit concerning, but looking at the page you linked it looks like they are solved, or at least for now. I do see a couple of jpg's urls with what looks like base64-encoded urls responding with 404 though.

For most of the other items you posted:

If you're new to the module, skimming the FAQ may be helpful: https://www.modpagespeed.com/doc/faq

The debug filter may also be helpful: https://www.modpagespeed.com/doc/config_filters#unsupported-filters https://www.pagespeedguide.com/documentation/debugging

Otto

On Fri, Apr 6, 2018 at 10:20 PM anarchoi notifications@github.com wrote:

I'm struggling to get page speed modules to work on this test site: https://www.ni-dieu-ni-maitre2.com/tshirt-evolution-barcode-0016026448

Some other mods are working correctly like insert_dns_prefetch and collapse_whitespace

I'm a novice with Linux stuff but I did a lot of trials and errors to try to get it to work myself... But I need help :(

Google Page Speed Configurations read more about it from https://developers.google.com/speed/pagespeed/module/system

pagespeed FileCachePath "/var/cache/nginx/"; pagespeed FileCacheSizeKb 102400; pagespeed FileCacheCleanIntervalMs 3600000; pagespeed FileCacheInodeLimit 500000;

LRU Cache

pagespeed LRUCacheKbPerProcess 8192; pagespeed LRUCacheByteLimit 16384;

pagespeed UsePerVhostStatistics on;

Use memcached servers

pagespeed MemcachedServers "host1:port1,host2:port2,host3:port3";

Purge Cache

pagespeed EnableCachePurge off;

pagespeed FetchWithGzip on; pagespeed HttpCacheCompressionLevel 9;

Added for per vhost coontrol

pagespeed RewriteLevel PassThrough;

pagespeed Domain *.ni-dieu-ni-maitre2.com;

pagespeed Domain scripts.ni-dieu-ni-maitre2.com;

pagespeed EnableFilters combine_css;

pagespeed EnableFilters combine_javascript;

pagespeed EnableFilters inline_javascript; pagespeed EnableFilters inline_css; pagespeed EnableFilters make_google_analytics_async; pagespeed EnableFilters collapse_whitespace; pagespeed EnableFilters rewrite_css; pagespeed EnableFilters insert_dns_prefetch;

pagespeed EnableFilters lazyload_images;

pagespeed EnableFilters local_storage_cache; pagespeed EnableFilters outline_css;

pagespeed EnableFilters outline_javascript;

pagespeed EnableFilters prioritize_critical_css; pagespeed EnableFilters resize_mobile_images; pagespeed EnableFilters resize_rendered_image_dimensions; pagespeed EnableFilters sprite_images; pagespeed EnableFilters remove_quotes; pagespeed EnableFilters dedup_inlined_images;

pagespeed EnableFilters convert_jpeg_to_webp; #causes 404 errors

pagespeed EnableFilters inline_images; pagespeed EnableFilters rewrite_javascript;

pagespeed LoadFromFile "https://scripts.ni-dieu-ni-maitre2.com/" "/home/ndnmdev/public_html/scripts/";

domain conf:

:nginx:Nginx+ PHP-FPM Default Stand Alone:2.0:

server { listen 144.217.68.82:443 ssl http2 ; server_name ni-dieu-ni-maitre2.com www.ni-dieu-ni-maitre2.com; root /home/ndnmdev/public_html; index index.php index.php5 index.php4 index.php3 index.perl index.pl index.cgi index.phtml index.shtml index.xhtml index.html index.htm $

ssl on;
ssl_certificate /usr/local/nginx/conf/ssl.cert.d/ni-dieu-ni-maitre2.com_cert;
ssl_certificate_key /usr/local/nginx/conf/ssl.key.d/ni-dieu-ni-maitre2.com_key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-A$
ssl_session_cache shared:SSL:10m;
ssl_session_timeout  5m;

#.............. Cpnginx OCSP stapling protection for security start ....................
ssl_stapling on;
ssl_stapling_verify on;
ssl_trusted_certificate /usr/local/nginx/conf/ssl.ca.d/ni-dieu-ni-maitre2.com_ca-bundle;
resolver 127.0.0.1 8.8.8.8 4.2.2.1 8.8.4.4 4.2.2.2  valid=300s;
resolver_timeout 5s;
#.............. Cpnginx OCSP stapling protection for security end....................

location = /favicon.ico {
    log_not_found off;
}

access_log /usr/local/apache/domlogs/ni-dieu-ni-maitre2.com-bytes_log bytes_log buffer=32k flush=5m;
access_log /usr/local/apache/domlogs/ni-dieu-ni-maitre2.com-ssl_log combined buffer=32k flush=5m;

referer_hash_bucket_size 512;
# Run Staic  file directly from nginx
location ~* ^.+.(gif|ico|zip|tgz|gz|rar|bz2|iso|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|mp3|ogv|ogg|flv|swf|mpeg|mpg|mpeg4|mp4|av$
    expires 30d;
    add_header Pragma public;
    add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
keepalive_requests 100;
keepalive_timeout 60s;
autoindex on;
# Disable direct access to .ht files and folders
location ~ /\.ht {
      deny all;
}
# Access all cpanel services
location ~* ^/(cpanel|webmail|whm|bandwidth|img-sys|java-sys|mailman/archives|pipermail|sys_cpanel|cgi-sys|mailman) {
    proxy_pass   http://144.217.68.82:9080;
    proxy_set_header   Host   $host;
    proxy_set_header   X-Real-IP  $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
}

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass unix:/opt/cpanel/ea-php70/root/usr/var/run/php-fpm/ndnmdev.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include /usr/local/nginx/conf/fastcgi_params;

    }

# Enable google Page speed
pagespeed on;
pagespeed RespectVary on;
# Ensure requests for pagespeed optimized resources go to the pagespeed handler  and no extraneous headers get set.
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; }
# filters
pagespeed RewriteLevel CoreFilters;
pagespeed PreserveUrlRelativity on;
pagespeed DisableFilters rewrite_css,rewrite_javascript,combine_css,inline_css,rewrite_images;
pagespeed EnableFilters fallback_rewrite_css_urls;

# Map domain works as a  cdn
pagespeed Domain https://www2.ni-dieu-ni-maitre2.com;

# Map Original Domains
pagespeed MapOriginDomain origin_to_fetch_from origin_specified_in_html [host_header];

# Respect froned Proxy
pagespeed RespectXForwardedProto on;
# Allow Let's Encrypt client authentication - letsencrypt.org RFC 5785
location ~ /.well-known { allow all; }

location / {
    include /usr/local/nginx/conf/vhost.ssl.d/ni-dieu-ni-maitre2.com.rewrite;
    client_max_body_size    2000m;
    client_body_buffer_size 512k;
    try_files $uri $uri/ /index.php?$args;

}
# include /usr/local/nginx/conf/vhost.ssl.d/ni-dieu-ni-maitre2.com.include;

}

server { listen 144.217.68.82:443 ssl http2 ; server_name cpanel.ni-dieu-ni-maitre2.com whm.ni-dieu-ni-maitre2.com webmail.ni-dieu-ni-maitre2.com webdisk.ni-dieu-ni-maitre2.com cpcalen$ ssl on; ssl_certificate /usr/local/nginx/conf/ssl.cert.d/ni-dieu-ni-maitre2.com_cert; ssl_certificate_key /usr/local/nginx/conf/ssl.key.d/ni-dieu-ni-maitre2.com_key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; ssl_session_cache shared:SSL:10m; ssl_session_timeout 5m; access_log off; location / { location ~ /.well-known{ root /home/ndnmdev/public_html; } proxy_pass https://127.0.0.1:9443; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/apache/incubator-pagespeed-ngx/issues/1549, or mute the thread https://github.com/notifications/unsubscribe-auth/ACIsRHF3vQtjfaKRqoTxokri9Kihjs2aks5tl83_gaJpZM4TKpku .