Issue serving up proxy

I am trying to get a proxy site to work over HTTPS for SABnzbd my main site https://my-site.duckdns.org works fine however, when I add the proxy (shown below) I cannot browse to https://my-site.duckdns.org/SABnzbd

Do I just specify HTTPS on SABNZBD but then point the redirect to the localport of 5369? Also please can someone confirm if an application asks for the cert key and path where do I point these ?

my-site.duckdns.org {

ext .html .htm .php
root C:\Caddy\www                    # Windows location, change it to where the html root is on your system/OS

# Gzip will compress files to speedup/minimize the size of data transferred but not 100% necessary

gzip {
    min_length  256
    level       5
}

    # The new code below will startup the server & proxy PHP requests

startup C:\PHP\php-cgi -b 127.0.0.1:9000 &
fastcgi / 127.0.0.1:9000 php {
    index index.php
	
}

    # You can normally use "127.0.0.1" or "localhost", use "Host IP" if your running the web server on different machine

proxy /sabnzb https://127.0.0.1:9090 {           # https://sabnzbd.org/
    transparent
}

I am not very good with this kind of stuff its quite new to me and a sharp learning curve I am willing to offer some financial incentive for some help.

My ultimate goal is to get my site my-site.com and all my subdomains sabnzbd.my-site.com to work with SSL over HTTPS.

Please let me know if you can help and how much you would be looking for :smiley: thanks in advance guys

I see two potential problems:

  1. SABnzbd default port is 8080 (unless you’ve changed it?)
  2. You’re trying to proxy to https://127.0.0.1, you should drop the scheme
    (https to a private address will always fail at cert validation unless you have a trusted root cert)

And some minor points of note:

  1. index index.php is redundant with the php preset; you can drop the bracketed section
  2. Your proxy basepath is /sabnzb, might you intend to proxy from /sabnzbd instead?
  3. gzip is quite fast; if your server is running SABnzbd, it’s definitely way faster than required to use the default compression levels

An example Caddyfile with above fixes incorporated:

my-site.duckdns.org {
    # Serve files
    ext .html .htm .php
    root C:\Caddy\www
    gzip

    # Proxy PHP to fastcgi
    startup C:\PHP\php-cgi -b 127.0.0.1:9000 &
    fastcgi / 127.0.0.1:9000 php

    # Proxy to SABnzbd
    proxy /sabnzbd 127.0.0.1:8080 {
        transparent
    }
}

As for this question:

Which application is asking, and for what reason? Caddy does have a folder where it stores ACME certs - you could theoretically use them for other purposes that share a domain name, but no application should need to ask for them in order for this proxy setup to work just fine.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.