<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body vlink="#551A8B" text="#000000" link="#0B6CDA" bgcolor="#f9f9fa"
    alink="#EE0000">
    <p>Hey Peter,<br>
      <br>
      Thanks so much for the helpful response.<br>
      <br>
      I'm only now seeing the response, I needed this weeks ago. It went
      to my spam 😭😭<br>
      <br>
      Anyways, I added the <a class="moz-txt-link-freetext" href="rewrite:trace3">rewrite:trace3</a> to the LogLevel and some
      Apache errors did appear indeed.<br>
      <br>
      <font color="#3584e4"><date>   Error    <ip>       
        [<a class="moz-txt-link-freetext" href="rewrite:trace2">rewrite:trace2</a>] mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        init rewrite engine with requested uri /                Apache
        error<br>
        <date>   Error    <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace3">rewrite:trace3</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        applying pattern '^(.*)$' to uri '/'                Apache error<br>
        <date>    Error    <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace3">rewrite:trace3</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        applying pattern '^(.*)$' to uri '/'                Apache error<br>
        <date>    Error   <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace3">rewrite:trace3</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        applying pattern '^(.*)$' to uri '/'                Apache error<br>
        <date>    Error    <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace3">rewrite:trace3</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        applying pattern '^(.*)$' to uri '/'                Apache error<br>
        <date>    Error    <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace3">rewrite:trace3</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        applying pattern '^' to uri '/'                Apache error<br>
        <date>    Error    <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace2">rewrite:trace2</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        rewrite '/' ->
        'https://<redacted>.<redacted>.com/'               
        Apache error<br>
        <date>   Error    <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace2">rewrite:trace2</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        explicitly forcing redirect with
        https://<redacted>.<redacted>.com/               
        Apache error<br>
        <date>    Error    <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace2">rewrite:trace2</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        setting lastsub to rule with output
        <a class="moz-txt-link-freetext" href="https://%">https://%</a>{HTTP_HOST}%{REQUEST_URI}                Apache error<br>
        <date>    Error    <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace1">rewrite:trace1</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        escaping https://<redacted>.<redacted>.com/ for
        redirect        Apache error<br>
        <date>    Error    <ip>        [<a class="moz-txt-link-freetext" href="rewrite:trace1">rewrite:trace1</a>]
        mod_rewrite.c(490): 127.0.0.1 - -
[<redacted>.<redacted>.com/sid#5583ddf8eb88][rid#7efbfc16ff50/initial]
        redirect to https://<redacted>.<redacted>.com/
        [REDIRECT/301]</font><br>
      <br>
      Does this confirm what was highlighted in the github repo as the
      issue?<br>
      <br>
      May I ask what would you suggest?<br>
      <br>
      Thanks,<br>
      <br>
      Lee Daniel<br>
      <br>
    </p>
    <div class="moz-cite-prefix">On 9/23/24 02:47, Peter Bowyer wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJvSBVP8ieD3Vh+Hnbzz5f=g0tbB7j0eVmEgGhwjD9fnY0p_Ew@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Hi Lee,</div>
        <div><br>
        </div>
        <div>This bit in your Apache config looks wrong: <a
href="https://github.com/cnm-Git/Varnish-Default-VCL-Rules/blob/dfc45d79caca4bc05d778ba21e15b1d1ad0892d4/httpd.conf#L102-L114"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/cnm-Git/Varnish-Default-VCL-Rules/blob/dfc45d79caca4bc05d778ba21e15b1d1ad0892d4/httpd.conf#L102-L114</a></div>
        <div><br>
        </div>
        <div>When a request comes in for
          https://<redacted>.<redacted>.com it gets
          redirected to...
          https://<redacted>.<redacted>.com. Cue endless
          loop.</div>
        <div><br>
        </div>
        <div>Add <a class="moz-txt-link-freetext" href="rewrite:trace3">rewrite:trace3</a> (or higher) to your LogLevel to get
          what's happening in the RewriteRules logged.<br>
        </div>
        <div><br>
        </div>
        <div>Peter<br>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Sun, 22 Sept 2024 at 08:49,
          Lee Daniel <<a href="mailto:lee@caribbeannewmedia.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">lee@caribbeannewmedia.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <div>Hey Guys,<br>
              <br>
              My earlier question was "When to use Varnish in front or
              behind NGinx."<br>
              <br>
              Thanks much for the responses and advise.<br>
              <br>
              I actually prefer it the way that was suggested <a
              style="white-space:pre-wrap" moz-do-not-send="true">nginx:443</a><span
              style="white-space:pre-wrap"> -> <a
              moz-do-not-send="true">varnish:6081</a> -> <a
              moz-do-not-send="true">httpd:7080</a>.</span></div>
            <div><span style="white-space:pre-wrap">That way, in plesk, I can configure nginx per site.

The issue I am having now is when I set it up that way I get too many redirects.

Through Varnishstat, I can see the hits being made but the webpage won't load. 

I have uploaded my configuration on github to reduce the text and ease to read. 

If anyone has the patience can you tell me what needs to be adjusted. 

I will upload my .htaccess, nginx.conf, httpd.conf and default.vlc.</span></div>
            <div><span style="white-space:pre-wrap">Repo <a
href="https://github.com/cnm-Git/Varnish-Default-VCL-Rules"
              target="_blank" moz-do-not-send="true">here</a>. I hope I did not do a terrible Job redacting.
</span></div>
            <div><span style="white-space:pre-wrap">
As of now my backend health is 5/5.
The default.vlc I found online, claim to be well tailored for Drupal sites.
Made little tweaks.



I will appreciate any help.

Regards, 

Lee

</span></div>
          </div>
          _______________________________________________<br>
          varnish-misc mailing list<br>
          <a href="mailto:varnish-misc@varnish-cache.org"
            target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">varnish-misc@varnish-cache.org</a><br>
          <a
href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
        </blockquote>
      </div>
      <br clear="all">
      <br>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr">
          <div>
            <div dir="ltr">
              <div>Maple Design Ltd<br>
                <a href="http://www.mapledesign.co.uk/" target="_blank"
                  moz-do-not-send="true">http://www.mapledesign.co.uk<br>
                </a>+44 (0)330 122 0034<br>
                <br>
                Reg. in England no. 05920531</div>
              <div>Prices exclude VAT where applicable</div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <div class="moz-signature">-- <br>
      <br>
    </div>
  </body>
</html>