The following is machine translation. My English is not very good. Please forgive me.
I deployed two HTTPS domain names using caddy, and they worked very well!
But I need to access the caddy default page by typing IP directly into the browser(Through port 80),The current situation is “IP connects directly to the server, and the browser prompts ERR_SSL_PROTOCOL_ERROR”.
How can I set up to enable IP access to successfully enter the caddy default page using http?
If the following default settings are enabled.
:80 {
root * /usr/share/caddy
file_server
}
The other two domain name websites that run perfectly will also go to the caddy default page.
What I want is
1.Access to the caddy default page through the browser IP,80 port.
2.Will not affect the normal operation of the https domain name page.
Be aware that doing this will turn off the HTTP->HTTPS redirects that are automatically enabled for your example.com domain, since :80 will override those redirects.
If that doesn’t answer your question, I’m not sure I understand the problem.
The result of this configuration is
IP → /usr/share/caddy/index.html (Correct) example.com → /usr/share/caddy/index.html (Not the right /var/www/example.com/index.html)
What I want is
IP → caddy/index.html example.com → example.com/index.html (HTTP->HTTPS redirects)