[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Webserver


Greetings Chewbakka,

Your httpd is listening on port 7000 instead of the port 80 that I
suggested in the guide:

> server "chewbakka.host.oddprotocol.org" {
>         listen on * port 7000

Your relayd however is forwarding to port 80. So it can't forward
properly, that's why your website isn't loading.

-- 
Aaron Lin
jrmu@xxxxxxxxxx
IRCNow (https://ircnow.org)

On Mon, Jun 30, 2025 at 11:04:57AM +0000, chewy@xxxxxxxxxxxxxxxx wrote:
> Hello All
> 
> This is my httpd conf:
> 
> # $OpenBSD: httpd.conf,v 1.22 2020/11/04 10:34:18 denis Exp $
> 
> #server "chewbakka.host.oddprotocol.org" {
> #       listen on * port 443
> #       location "/.well-known/acme-challenge/*" {
> #               root "/acme"
> #               request strip 2
> #       }
> #       location * {
> #               block return 302 "https://$HTTP_HOST$REQUEST_URI";
> #       }
> #}
> 
> #server "bnc.chewbakka.host.oddprotocol.org" {
> #        listen on * port 443
> #        location "/.well-known/acme-challenge/*" {
> #                root "/acme"
> #                request strip 2
> #        }
> #       location * {
> #               block return 302 "https://$HTTP_HOST$REQUEST_URI";
> #       }
> #}
> 
> server "chewbakka.host.oddprotocol.org" {
>         listen on * port 7000
> #       tls {
> #               certificate "/etc/ssl/chewbakka.host.oddprotocol.org.crt"
> #               key "/etc/ssl/private/chewbakka.host.oddprotocol.org.key"
> #       }
>         location "/pub/*" {
>                 directory auto index
>         }
>         location "/.well-known/acme-challenge/*" {
>                 root "/acme"
>                 request strip 2
>         }
> 
> }
> server "bnc.chewbakka.host.oddprotocol.org" {
>         listen on * port 31337
>  #       tls {
>  #               certificate "/etc/ssl/bnc.chewbakka.host.oddprotocol.org.crt"
>  #               key "/etc/ssl/private/bnc.chewbakka.host.oddprotocol.org.key"
>  #       }
>         location "/pub/*" {
>                 directory auto index
>         }
>         location "/.well-known/acme-challenge/*" {
>                 root "/acme"
>                 request strip 2
>         }
> }
> 
> -------------------------------------------------------------------------------------------------------------------------------
> And this is my relayd.conf:
> 
> chewbakka$ doas cat /etc/relayd.conf
> ip4="104.167.242.171"
> ip6="2602:fccf:1:2171::"
> table <www> { 127.0.0.1 }
> table <znc> { 127.0.0.1 }
> #table <service2> { 127.0.0.1 }
> log connection
> http protocol https {
>         match request header append "X-Forwarded-For" value "$REMOTE_ADDR"
>         match request header append "X-Forwarded-By" \
>             value "$SERVER_ADDR:$SERVER_PORT"
>         match request header set "Connection" value "close"
>         tcp { sack, backlog 128 }
>         tls { keypair chewbakka.host.oddprotocol.org }
>         tls { keypair bnc.chewbakka.host.oddprotocol.org }
>         match request header "Host" value "chewbakka.host.oddprotocol.org" forward to <www>
>         match request header "Host" value "bnc.chewbakka.host.oddprotocol.org" forward to <znc>
> }
> relay wwwtls {
>         listen on $ip4 port 443 tls
>         protocol https
>         forward to <www> port 80 check icmp
>         forward to <znc> port 80 check icmp
> }
> relay www6tls {
>         listen on $ip6 port 443 tls
>         protocol https
>         forward to <www> port 80 check icmp
>         forward to <znc> port 80 check icmp
> }
> 
> ----------------------------------------------------------------------------------------------------------------------------
> Both deamons are running (ok) but i cant access the website https://chewbakka.host.oddprotocol.org with my browser.
> 
> Where did i go wrong?
> 
> Chewy
> 
> 
> 

References:
Webserver"chewy@xxxxxxxxxxxxxxxx" <chewy@xxxxxxxxxxxxxxxx>