0

I have caddy installed and running in my CentOS server,mainly I have it to proxy request to 2 Golang applications that I have running and it's working great! Now, I need to serve a static site, but i't returning connection refused

The structure of my directory is:

|--Caddyfile
|--mygolang1
|--mygolang2
|--FolderofMyStaticSite
|-----MySite
|-------Public
|----------index.html

And the caddyfile configuration is

:9000 {
   root FolderofMyStaticSite/MySite/
   log  mySite
}

subdomain1.domain.com {
  gzip
  proxy / :7000 {
     except /assets /robots.txt
  }
}

subdomain2.domain.com {
  proxy / :8000 {
    max_fails 1
  }
}

Then when I go to the browser and open xxx.xxx.xxx.xxx:9000 I get connection refused, why port 9000? it's because I have it only for testing not for production but I need a port to hear that site. What Am I missing? Thanks!

Sredny M Casanova
  • 4,735
  • 21
  • 70
  • 115
  • Assuming you have TLS configured correctly, your Caddyfile looks good. Are you sure you have Caddy running and port 9000 open? –  Apr 14 '17 at 20:25
  • @JeremiahMegel yes TLS was configured fine, caddy is running because the other applications are available trought the browser. I checked the list of ports and port 9000 is not used by any other process – Sredny M Casanova Apr 14 '17 at 20:42
  • What version of Caddy are you running? (`caddy -version`) –  Apr 15 '17 at 22:43

0 Answers0