Caddy configured domain name not effective

1. The problem I’m having:

The Caddy domain name configuration is not effective, but the configured port number can be accessed. You can see the configuration file as follows:

: 9616{
Response “Goodbye, world!”
}

http://api.webdemo.com:9617 {
Root * E: \ IISWeb \ h5. web. com \ root \ mall3

File_server
}

http://h5.webdemo.com {
Root * E: \ IISWeb \ h5. web. com \ root \ mall3

File_server
}

http://api.webdemo.com:9617 And http://h5.webdemo.com Pointing to the same location, but 9617 and 9616 with port numbers can be accessed, only domain names cannot be accessed, prompt 504

I can’t think why, why can’t the one without a port number be accessed? Is port 80 not being monitored? Or for some other reason? Requesting everyone’s help.

2. Error messages and/or full log output:

Port 9616 is also working,
image

Directly accessing another domain name without a port number, does not work。


As shown in the figure, direct domain name access does not work, with a prompt of 504. Ports can be accessed normally.

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

3. Caddy version:

V2

4. How I installed and ran Caddy:

a. System environment:

b. Command:

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:

Please completely fill out the help topic template. Don’t skip any sections.

Please use code blocks when posting your config, to preserve formatting.

Your Caddyfile doesn’t make sense. Directives are case sensitive.

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