MapProxyDomain: "Fetch failed to start" + "4xx status code, preventing rewriting of"

305 views
Skip to first unread message

yogi margarine

unread,
Nov 29, 2017, 10:27:15 AM11/29/17
to mod-pagesp...@googlegroups.com
Hi,

I've succesfuly optimized the Web site I'm working on (say https://beta.mydomain.org) using the wonderful tool MPS is. Some images are hosted on another domain (which is available at https://api.mydomain.org) and the next step is to have them optimized and proxied by MPS. As for the environment, I'm using mod_pagespeed/1.12.34.1-0 on Apache/2.4.10 (Debian) and the MPS configuration file can be found at the end of this message. 

My first trials were succesful: the images hosted on https://api.mydomain.org were optimized and proxied. The URL changed from e.g. https://api.mydomain.org/img:002121714CRS.jpg to https://beta.mydomain.org/api/ximg,3A002121714CRS.jpg.pagespeed.ic.7ZodJ3SDe7.webp in the HTML. Quite logically, I was able to find the associated entries in Apache access.log:

XXX.XXX.XXX.XXX - - [29/Nov/2017:08:54:01 +0100] "GET /api/ximg,3A002121714CRS.jpg.pagespeed.ic.7ZodJ3SDe7.webp HTTP/1.1" 200 14049 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36"
XXX.XXX.XXX.XXX - - [29/Nov/2017:09:00:31 +0100] "GET /api/ximg,3A002121714CRS.jpg.pagespeed.ic.7ZodJ3SDe7.webp HTTP/1.1" 304 320 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36"
XXX.XXX.XXX.XXX - - [29/Nov/2017:09:00:32 +0100] "GET /api/ximg,3A002121714CRS.jpg.pagespeed.ic.7ZodJ3SDe7.webp HTTP/1.1" 304 182 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36"

The problem is that, after a few refreshes, the images aren't proxied/optimized anymore and the URL reverted back to https://api.mydomain.org/img:002121714CRS.jpg . Investigating this, I noticed relevant entries in MPS message history e.g.:

[Wed, 29 Nov 2017 11:35:50 GMT] [Error] [113376] [https://api.mydomain.org/img:002121714CRS.jpg:0] serf_context_run error status=20014 (Internal error)
[Wed, 29 Nov 2017 11:35:50 GMT] [Warning] [113376] Fetch failed to start: https://api.mydomain.org/img:002121714CRS.jpg

Those messages are reflected in Apache error.log:

[Wed Nov 29 11:35:50.223026 2017] [pagespeed:error] [pid 113376:tid 140626330797824] [mod_pagespeed 1.12.34.1-0 @113376] https://api.mydomain.org/img:002121714CRS.jpg:0: serf_context_run error status=20014 (Internal error)
[Wed Nov 29 11:35:50.223055 2017] [pagespeed:warn] [pid 113376:tid 140626330797824] [mod_pagespeed 1.12.34.1-0 @113376] Fetch failed to start: https://api.mydomain.org/img:002121714CRS.jpg

More information is available in HTML comments after enabling the debug filter using the URL parameter:

<!--4xx status code, preventing rewriting of https://api.mydomain.org/img:002121714CRS.jpg--><!--4xx status code, preventing rewriting of https://api.mydomain.org/img:002121714CRS.jpg-->

I tried to flush MPS cache using the admin page with no luck. I would be grateful for any clue on how to solve these issues.
Here Follows the configuration. Any remarks (like useless entries, Iknow there are some) would also be highly welcome.

    ModPagespeed on

    AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
    AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER application/xhtml+xml

    ModPagespeedSslCertDirectory "/etc/ssl/certs/gandi/"
    ModPagespeedSslCertFile "GandiStandardSSLCA2.pem"

    ModPagespeedDomain https://beta.mydomain.org

    ModPagespeedMapOriginDomain "http://beta.mydomain.org" \
                                    "https://beta.mydomain.org"

    ModPagespeedDomain https://api.mydomain.org



    #***********************************************************************
    #***********************************************************************
    # LOADING STATIC FILES FROM FILE SYSTEM INSTEAD OF FETCHING THEM 
    #***********************************************************************
    #***********************************************************************

    ModPagespeedLoadFromFile "https://beta.mydomain.org/preprod/wp-includes/" \
                                 "/home/beta/www/preprod/wp-includes/"

    ModPagespeedLoadFromFile "https://beta.mydomain.org/preprod/wp-content/" \
                                  "/home/beta/www/preprod/wp-content/"

    ModPagespeedLoadFromFileRuleMatch disallow .*$
    ModPagespeedLoadFromFileRuleMatch allow \.css$
    ModPagespeedLoadFromFileRuleMatch allow \.js$
    ModPagespeedLoadFromFileRuleMatch allow \.gif$
    ModPagespeedLoadFromFileRuleMatch allow \.png$
    ModPagespeedLoadFromFileRuleMatch allow \.jpg$
    ModPagespeedLoadFromFileRuleMatch allow \.jpeg$
    ModPagespeedLoadFromFileRuleMatch allow \.pdf$
    ModPagespeedLoadFromFileRuleMatch allow \.svg$

    #***********************************************************************
    #***********************************************************************
    # ENABLING GZIP COMPRESSION FOR FILES SERVED BY MOD_PAGESPEED
    #***********************************************************************
    #***********************************************************************

    # enable mod_deflate for html,xml,js,css,php files 
    ModPagespeedFetchWithGzip on
    SetOutputFilter DEFLATE
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml
    AddOutputFilterByType DEFLATE application/xhtml+xml text/javascript
    AddOutputFilterByType DEFLATE text/css application/x-javascript
    AddOutputFilterByType DEFLATE application/x-httpd-php
    DeflateCompressionLevel 9
    # for old (not compatbile) browsers
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    # Set env var for images
    SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip

    #***********************************************************************
    #***********************************************************************
    # CACHING 
    #***********************************************************************
    #***********************************************************************

    # "extend cache": better cacheability while allowing resource updates
    # to be propagated to the user's browser
    ModPagespeedEnableFilters extend_cache,extend_cache_pdfs

    # enabling memcached
    ModPagespeedMemcachedServers localhost:11211
    ModPagespeedFileCachePath "/var/mod_pagespeed/cache/"
    ModPagespeedFileCacheSizeKb 102400
    ModPagespeedLRUCacheKbPerProcess 8192
    ModPagespeedLRUCacheByteLimit 16384
    # enable individual URL cache purging
    ModPagespeedEnableCachePurge on
    ModPagespeedPurgeMethod PURGE
    # further speedup : a portion of the cache is kept in memory, to reduce 
    # load on disk (or memcached) from many small files.
    ModPagespeedCreateSharedMemoryMetadataCache "/var/cache/mod_pagespeed/" \
                                                     51200

    #***********************************************************************
    #***********************************************************************
    # ENABLING/CONFIGURING NON CORE FILTERS FOR IMG, CSS, JS RESOURCES
    #***********************************************************************
    #***********************************************************************

    #***********************************************************************
    # Image filters
    #***********************************************************************
    ModPagespeedEnableFilters rewrite_images,insert_image_dimensions
    ModPagespeedEnableFilters sprite_images,lazyload_images,inline_images
    ModPagespeedEnableFilters inline_preview_images,resize_images
    ModPagespeedEnableFilters recompress_images,convert_jpeg_to_webp
    ModPagespeedEnableFilters recompress_jpeg,recompress_png,recompress_webp
    ModPagespeedEnableFilters convert_gif_to_png,convert_jpeg_to_progressive
    # Default is 8, the server can (and should) handle more 
    # Helps with reducing the "Too busy to rewrite image" messages
    ModPagespeedImageMaxRewritesAtOnce 30
    ModPagespeedEnableFilters resize_rendered_image_dimensions
    ModPagespeedImageInlineMaxBytes 5096

    #***********************************************************************
    # CSS filters
    #***********************************************************************
    ModPagespeedEnableFilters rewrite_css,move_css_above_scripts,combine_css
    ModPagespeedEnableFilters inline_css,flatten_css_imports
    ModPagespeedEnableFilters prioritize_critical_css,inline_google_font_css
    ModPagespeedEnableFilters rewrite_style_attributes,move_css_to_head

    #***********************************************************************
    # JS filters
    #***********************************************************************
    ModPagespeedEnableFilters rewrite_javascript,inline_javascript
    ModPagespeedEnableFilters canonicalize_javascript_libraries
    ModPagespeedEnableFilters combine_javascript,rewrite_javascript
    ModPagespeedEnableFilters make_google_analytics_async
    ModPagespeedEnableFilters include_js_source_maps
    ModPagespeedMaxCombinedJsBytes -1


    #***********************************************************************
    #***********************************************************************
    # Misc Filters
    #***********************************************************************
    #***********************************************************************
    ModPagespeedEnableFilters combine_heads
    ModPagespeedEnableFilters collapse_whitespace,elide_attributes
    ModPagespeedEnableFilters trim_urls,remove_quotes,insert_dns_prefetch
    ModPagespeedEnableFilters inline_import_to_link,remove_comments

    #***********************************************************************
    #***********************************************************************


Joshua Marantz

unread,
Nov 29, 2017, 10:49:11 AM11/29/17
to mod-pagespeed-discuss
Thanks for the nice note!  Always great to hear.

What is the origin cache-control for https://api.mydomain.org/img:002121714CRS.jpg? If it's (say) 5 minutes, PageSpeed will need to re-fetch from origin at that interval to ensure it's not serving stale content to with a long TTL.  And if any of those periodic fetches fail, you'll get the results you see.

One thing that occurred to me -- of course I don't know your networking setup -- is whether you have multiple pagespeed-enabled servers behind a load balancer, and some of them might have trouble seeing api.mydomain.org, or might have trouble with the HTTPS setup?  Just a wild guess.

-Josh


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/535219111.8411851.1511968991772%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

yogi margarine

unread,
Nov 29, 2017, 11:37:14 AM11/29/17
to mod-pagesp...@googlegroups.com
Hi Joshua,

Thanks a lot for the lightning quick reply. No Cache-control HTTP header is defined in the response for https://api.mydomain.org/img:002121714CRS.jpg. Here are all the headers returned:

Server: nginx/1.6.2
Date: Wed, 29 Nov 2017 16:21:56 GMT
Content-Type: image/jpeg
Content-Length: 63064
Last-Modified: Wed, 29 Nov 2017 08:05:34 GMT
Connection: keep-alive
Keep-Alive: timeout=30
ETag: "5a1e6a4e-f658"
Access-Control-Allow-Origin: http://www.mydomain.org
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Headers: Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-DebugJrest-Data
Accept-Ranges: bytes

As for the network setup, I'll confirm you when the sysadmin has replied to me on the subject but I'm pretty sure the single pagespeed-enabled server instance is the one I'm working on and that no load-balancing is involved neither on it nor on https://api.mydomain.org.

What's weird (at least to me) is that it worked fine the first time I tried. Moreover, I see no reason why pagespeed would not be able to access the origin images considering I can without any problem whether from my browser or by wgetting it... Consequently, the 4XX errors in the debug filter enbaled HTML comments sound pretty strange...

Anything comes to your mind on how i could try to diagnose the problem further?

Otto van der Schaaf

unread,
Nov 29, 2017, 5:31:10 PM11/29/17
to mod-pagesp...@googlegroups.com
Are you seeing any traces of the failing fetches in the access logs?

Perhaps you can try a network packet analyser to get visibility in what passes between mod_pagespeed and the origin that it is failing to fetch from. 

If I remember correctly, the "fetch failed to start" message implies that something bad happens during the 
connection or possibly the ssl setup  (unfortunately I haven't been able to figure out what the error code (20014) means yet).

Otto

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/861030887.8513202.1511973184413%40mail.yahoo.com.

Joshua Marantz

unread,
Nov 29, 2017, 5:38:26 PM11/29/17
to mod-pagespeed-discuss
https://www.jefftk.com/p/serf-error-codes has a description of some serf error codes, but 20014 is not among them, unfortunately.  However it describes in some detail how to figure out what they might mean.


On Wed, Nov 29, 2017 at 5:30 PM, Otto van der Schaaf <osc...@we-amp.com> wrote:
Are you seeing any traces of the failing fetches in the access logs?

Perhaps you can try a network packet analyser to get visibility in what passes between mod_pagespeed and the origin that it is failing to fetch from. 

If I remember correctly, the "fetch failed to start" message implies that something bad happens during the 
connection or possibly the ssl setup  (unfortunately I haven't been able to figure out what the error code (20014) means yet).

Otto
On Wed, Nov 29, 2017 at 5:37 PM 'yogi margarine' via mod-pagespeed-discuss <mod-pagespeed-discuss@googlegroups.com> wrote:
Hi Joshua,

Thanks a lot for the lightning quick reply. No Cache-control HTTP header is defined in the response for https://api.mydomain.org/img:002121714CRS.jpg. Here are all the headers returned:

Server: nginx/1.6.2
Date: Wed, 29 Nov 2017 16:21:56 GMT
Content-Type: image/jpeg
Content-Length: 63064
Last-Modified: Wed, 29 Nov 2017 08:05:34 GMT
Connection: keep-alive
Keep-Alive: timeout=30
ETag: "5a1e6a4e-f658"
Access-Control-Allow-Origin: http://www.mydomain.org
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Allow-Headers: Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-DebugJrest-Data
Accept-Ranges: bytes

As for the network setup, I'll confirm you when the sysadmin has replied to me on the subject but I'm pretty sure the single pagespeed-enabled server instance is the one I'm working on and that no load-balancing is involved neither on it nor on https://api.mydomain.org.

What's weird (at least to me) is that it worked fine the first time I tried. Moreover, I see no reason why pagespeed would not be able to access the origin images considering I can without any problem whether from my browser or by wgetting it... Consequently, the 4XX errors in the debug filter enbaled HTML comments sound pretty strange...

Anything comes to your mind on how i could try to diagnose the problem further?

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/CAHqmWiNUEPObK7x1TVxMta5822QfHc-O2crt6Xhb0E1Rto4T_w%40mail.gmail.com.

yogi margarine

unread,
Dec 1, 2017, 4:32:17 AM12/1/17
to mod-pagesp...@googlegroups.com
Thanks *a lot* for your help, Otto and Joshua. That's really appreciated. Sorry for the delayed response but it took time for me to get access to the origin logs as it's a production server and that i'm an external contractor.

First, let me note that I'm beginning to notice the same error messages when SERF attempts to fetch some resources originating from the same origin as the Web page (https://beta.mydomain.org/) pagespeed is optimizing, not only the distant origin i was having issues with. Here is an example:

https://beta.mydomain.org/choro/presentations/js/choro.js?ver=4.9.1:0] serf_context_run error status=20014 (Internal error)

This may suggest the issue is not related to the distant origin SSL setup. Futhermore, it happened to work with the same SSL setup for a short while. 

I can confirm what i wrote in my previous email: the only pagespeed-enabled server instance is the one I'm working on and no load-balancing is involved neither on it nor on https://api.mydomain.org.



>> Are you seeing any traces of the failing fetches in the access logs?

I checked the distant origin (api.mydomain.org) access log and here is what i found : i'm able to find logs for SERF fetches during the small period of time the domain mapping/proxying worked. Here are the initial fetches with a 200 status:

147.99.34.5 - - [29/Nov/2017:06:14:52 +0100] "GET /img:002113726CRS.jpg HTTP/1.1" 200 104754 "https://beta.mydomain.org/preprod/" "Serf/1.3.8(mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:14:52 +0100] "GET /img:002121659CRS.jpg HTTP/1.1" 200 36241 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:14:52 +0100] "GET /img:002121661CRS.jpg HTTP/1.1" 200 9796 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:14:52 +0100] "GET /img:002121685CRS.jpg HTTP/1.1" 200 83167 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:14:52 +0100] "GET /img:002121708CRS.jpg HTTP/1.1" 200 34752 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:14:52 +0100] "GET /img:002113718CRS.jpg HTTP/1.1" 200 75678 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:14:52 +0100] "GET /img:002113723CRS.jpg HTTP/1.1" 200 92253 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:14:52 +0100] "GET /img:002121691CRS.jpg HTTP/1.1" 200 56942 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"

Then an example of the subsequent fetches with a 304 status:

147.99.34.5 - - [29/Nov/2017:06:19:40 +0100] "GET /img:002121708CRS.jpg HTTP/1.1" 304 0 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:19:40 +0100] "GET /img:002121691CRS.jpg HTTP/1.1" 304 0 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:19:40 +0100] "GET /img:002121661CRS.jpg HTTP/1.1" 304 0 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:19:40 +0100] "GET /img:002121659CRS.jpg HTTP/1.1" 304 0 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:19:40 +0100] "GET /img:002113726CRS.jpg HTTP/1.1" 304 0 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:19:40 +0100] "GET /img:002113723CRS.jpg HTTP/1.1" 304 0 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:19:40 +0100] "GET /img:002113718CRS.jpg HTTP/1.1" 304 0 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"
147.99.34.5 - - [29/Nov/2017:06:19:40 +0100] "GET /img:002121685CRS.jpg HTTP/1.1" 304 0 "https://beta.mydomain.org/preprod/" "Serf/1.3.8 (mod_pagespeed/1.12.34.1-0)"

Since I get the "Fetch failed to start" messages with the 20014 SERF error, there is nothing in the access logs involving pagespeed or SERF anymore. Neither failures nor successes.

As the exact same fetching with SERF has been succesful at some point, i was thinking about trying to reinstall mod_pagespeed. I must confess it's a despair move and I don't have much hope it could improve the situation but it's one of the last move i can think of. 

What do you think about it?



Longinos

unread,
Dec 1, 2017, 8:04:40 AM12/1/17
to mod-pagespeed-discuss
Perhaps elated Github issue #778

Have you tried to enable ModPageSpeedFetchHttps?

Otto van der Schaaf

unread,
Dec 4, 2017, 5:50:58 PM12/4/17
to mod-pagesp...@googlegroups.com

One more thought on 20014 SERF -- could the server be running out of file descriptors?
Also, there was a similar issue earlier with ngx_pagespeed:

In that issue someone was trying to fetch https from an origin that was serving http...

Otto

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/c727e9d6-2cf1-4e74-aca3-c6d1038ba51c%40googlegroups.com.

yogi margarine

unread,
Dec 6, 2017, 7:10:25 AM12/6/17
to mod-pagesp...@googlegroups.com
First, let me thanks you all for your help and let me apologize for the delayed response. I had other things on my plate in the beginning of this week.

@Longinos
Thanks for the hints. I'm using pagespeed version > 10 and, as the doc states, it does not seem to be required anymore. This is what my tests confirmed.

I managed to have the domain mapping/proxying effective again. @Josh Thanks a lot for the tips, it helped me A LOT: i was basing my tests on a single refresh and if i had continued to do so. I would never have. Here is the meaningful extract of the working configuration:

    ModPagespeedDomain https://beta.tela-botanica.org
    ModPagespeedDomain https://api.tela-botanica.org
    ModPagespeedMapOriginDomain http://beta.tela-botanica.org \
                                    https://beta.tela-botanica.org
    ModPagespeedMapProxyDomain https://beta.tela-botanica.org/api/ \
                                    https://api.tela-botanica.org/
    ModPagespeedMapOriginDomain "http://api.tela-botanica.org/" \
                                    "https://api.tela-botanica.org/"

While this allows the domain mapping/proxying to be effective, I get the following error when restarting Apache.

[....] Restarting web server: apache2[Mon Dec 04 06:25:16.334279 2017] [pagespeed:error] [pid 69278:tid 139783884724096] [mod_pagespeed 1.12.34.1-0 @69278] RewriteDomain https://beta.tela-botanica.org/api/ has conflicting origins https://api.tela-botanica.org/ and http://api.tela-botanica.org/, overriding to http://api.tela-botanica.org/

As the pages contain only reference to the https version for api.tela-botanica.org, I tried to comment the ModPagespeedMapOriginDomain directive for the api.tela-botanica.org domain which semt useless anyway² . Quite logically, the error vanishes but the domain mapping/proxying fails with the "Fetch failed to start" error. This was what caused the error I had originally.

    ModPagespeedDomain https://beta.tela-botanica.org
    ModPagespeedDomain https://api.tela-botanica.org
    ModPagespeedMapOriginDomain http://beta.tela-botanica.org \
                                    https://beta.tela-botanica.org
    ModPagespeedMapProxyDomain https://beta.tela-botanica.org/api/ \
                                    https://api.tela-botanica.org/

As suggested by the error message fallback indication, I also tried to change the origin of RewriteDomain https://beta.tela-botanica.org/api/ to http://api.tela-botanica.org/ (sounds pretty strange as, as I wrote, the pages contain only reference to the https version for api.tela-botanica.org):

    ModPagespeedDomain https://beta.tela-botanica.org
    ModPagespeedDomain https://api.tela-botanica.org
    ModPagespeedMapOriginDomain http://beta.tela-botanica.org \
                                    https://beta.tela-botanica.org
    ModPagespeedMapProxyDomain https://beta.tela-botanica.org/api/ \
                                    http://api.tela-botanica.org/
    ModPagespeedMapOriginDomain "http://api.tela-botanica.org/" \
                                    "https://api.tela-botanica.org/"

(Of course) with no luck ("Fetch failed to start").

I'm not happy with the error. Any clue to make it disappear while still having the domain mapping/proxying effective would be greatly welcome.


Reply all
Reply to author
Forward
0 new messages