Мне удалось настроить Redis, nginx и varni sh для magento 2 в Ubuntu без SSL.
Выполнены все необходимые шаги, необходимые для настройки varni sh с помощью nginx.
Ниже приведены файлы конфигурации.
- / etc / default / varni sh
/ lib / systemd / system / varni sh .service
/ etc / varnish / default.vcl
/ etc / nginx / sites-available / magento
Журнал ошибок: varnishlog -q 'RespStatus == 503' - g request
- Begin req 32779 rxreq
- Timestamp Start: 1582114572.814013 0.000000 0.000000
- Timestamp Req: 1582114572.814013 0.000000 0.000000
- ReqStart 122.170.13.29 49606
- ReqMethod GET
- ReqURL /
- ReqProtocol HTTP/1.1
- ReqHeader Host: 13.126.114.136
- ReqHeader User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
- ReqHeader Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
- ReqHeader Accept-Language: en-US,en;q=0.5
- ReqHeader Accept-Encoding: gzip, deflate
- ReqHeader Connection: keep-alive
- ReqHeader Cookie: PHPSESSID=8hie1n4ddjurjoup67keoblubv; form_key=pKBGXC2YzDcWL6pi; mage-cache-storage=%7B%7D; mage-cache-storage-section-invalidation=%7B%7D; mage-cache-sessid=true; mage-messages=; recently_viewed_product=%7B%7D; recently_viewed_product_previous=%
- ReqHeader Upgrade-Insecure-Requests: 1
- ReqHeader Cache-Control: max-age=0
- ReqHeader X-Forwarded-For: 122.170.13.29
- VCL_call RECV
- ReqHeader grace: none
- ReqURL /
- ReqUnset Accept-Encoding: gzip, deflate
- ReqHeader Accept-Encoding: gzip
- VCL_return hash
- VCL_call HASH
- VCL_return lookup
- VCL_call MISS
- VCL_return fetch
- Link bereq 32781 fetch
- Timestamp Fetch: 1582114572.814245 0.000232 0.000232
- RespProtocol HTTP/1.1
- RespStatus 503
- RespReason Backend fetch failed
- RespHeader Date: Wed, 19 Feb 2020 12:16:12 GMT
- RespHeader Server: Varnish
- RespHeader Content-Type: text/html; charset=utf-8
- RespHeader Retry-After: 5
- RespHeader X-Varnish: 32780
- RespHeader Age: 0
- RespHeader Via: 1.1 varnish (Varnish/5.2)
- VCL_call DELIVER
- RespUnset Age: 0
- RespHeader Pragma: no-cache
- RespHeader Expires: -1
- RespHeader Cache-Control: no-store, no-cache, must-revalidate, max-age=0
- RespUnset Server: Varnish
- RespUnset X-Varnish: 32780
- RespUnset Via: 1.1 varnish (Varnish/5.2)
- VCL_return deliver
- Timestamp Process: 1582114572.814265 0.000252 0.000019
- RespHeader Content-Length: 282
- RespHeader Connection: keep-alive
- Timestamp Resp: 1582114572.814298 0.000285 0.000033
- ReqAcct 1095 0 1095 269 282 551
- End
** << BeReq >> 32781
-- Begin bereq 32780 fetch
-- Timestamp Start: 1582114572.814101 0.000000 0.000000
-- BereqMethod GET
-- BereqURL /
-- BereqProtocol HTTP/1.1
-- BereqHeader Host: 13.126.114.136
-- BereqHeader User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0
-- BereqHeader Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
-- BereqHeader Accept-Language: en-US,en;q=0.5
-- BereqHeader Cookie: PHPSESSID=8hie1n4ddjurjoup67keoblubv; form_key=pKBGXC2YzDcWL6pi; mage-cache-storage=%7B%7D; mage-cache-storage-section-invalidation=%7B%7D; mage-cache-sessid=true; mage-messages=; recently_viewed_product=%7B%7D; recently_viewed_product_previous=%
-- BereqHeader Upgrade-Insecure-Requests: 1
-- BereqHeader X-Forwarded-For: 122.170.13.29
-- BereqHeader grace: none
-- BereqHeader Accept-Encoding: gzip
-- BereqHeader X-Varnish: 32781
-- VCL_call BACKEND_FETCH
-- VCL_return fetch
-- FetchError no backend connection
-- Timestamp Beresp: 1582114572.814144 0.000042 0.000042
-- Timestamp Error: 1582114572.814148 0.000046 0.000004
-- BerespProtocol HTTP/1.1
-- BerespStatus 503
-- BerespReason Service Unavailable
-- BerespReason Backend fetch failed
-- BerespHeader Date: Wed, 19 Feb 2020 12:16:12 GMT
-- BerespHeader Server: Varnish
-- VCL_call BACKEND_ERROR
-- BerespHeader Content-Type: text/html; charset=utf-8
-- BerespHeader Retry-After: 5
-- VCL_return deliver
-- Storage malloc Transient
-- ObjProtocol HTTP/1.1
-- ObjStatus 503
-- ObjReason Backend fetch failed
-- ObjHeader Date: Wed, 19 Feb 2020 12:16:12 GMT
-- ObjHeader Server: Varnish
-- ObjHeader Content-Type: text/html; charset=utf-8
-- ObjHeader Retry-After: 5
-- Length 282
-- BereqAcct 0 0 0 0 0 0
-- End
Пробовал несколько решений, найденных здесь, но ни одно из них не работает.