Forwarding to port 80 and port 443 from outside

Hello!

1. The problem I’m having:

I’m new to this business, I need to make access from outside on port 80 and 443 for the application. I have figured out how to make a redirect to 443 so far. But I don’t understand how to make it possible to reach both ports.

2. Error messages and/or full log output:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

3. Caddy version:

v2.7.4

4. How I installed and ran Caddy:

wget “https://caddyserver.com/api/download?os=linux&arch=amd64&idempotency=111111” -O caddy

a. System environment:

centos 8

b. Command:

my3.example.org {
    redir https://my3.example.org{uri}
}

:80 {
    redir https://my3.example.org{uri}
}

:443 {
    reverse_proxy 192.168.5.63:80
    tls self_signed
}
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

c. Service/unit/compose file:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

d. My complete Caddy config:

PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.

5. Links to relevant resources:

What do you mean exactly? I’m not sure your config makes sense to me. Can you please fill out the help topic template so your question is clearer?

I’m sorry but I didn’t understand your question.

Well, I need to be able to log in via http to get to http and log in to https to get to https.

When you click New Topic and choose the Help category, a template appears where you write your post. Fill that out please (it asks you not to delete it) so we can help you :slight_smile:

Did I do the right thing now?

Closer, but most of it is still empty. I still have no idea what causes the error, what the error is, what the expected behavior is, or what you mean by “the application.”

Let me describe the task
I have a web server raised at the address 192.168.5.63
There is software for the medical center on it, which the client program connects to from an external network on 80 and 443 IP address. How to correctly register in the caddy config so that the software can connect to 192.168.5.63 on port 80 and 443?

If you want the client to access the site literally with a Host header value of 192.168.5.63 then you do need to use that IP in your config, rather than a domain name. You can have both, of course.

Caddy defaults to ports 443 and 80 already.

Hello!
Can I ask you to write the correct config? and then everything I do, I get only a working 443 and port 80 becomes unavailable