Caddy version: 0.9.5
uname -a : Linux portfolio 4.8.0-46-generic #49-Ubuntu SMP Fri Mar 31 13:57:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
php: 7.0.15
Hi,
I wanted to server host static html at / and a wordpress site at /fm with my domain name.
I have set up both dns and domain and vultr and namecheap and they work with nginx.
I have tried various Caddyfile configuration such as
my-domain.com
and ran it with caddy -conf="Caddyfile"
Firefox won’t load the static site at /. Request header is
GET / HTTP/1.1
Host: my-domain.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
DNT: 1
Upgrade-Insecure-Requests: 1
Connection: keep-alive
…with no response.
I tried with curl and I got
$ curl my-domain.com
<a href="https://my-domain.com/">Moved Permanently</a>.
I tried adding logs
my-domain.com {
root /var/www/html
log ../access.log
errors ../errors.log
}
and got
Activating privacy features... done.
https://my-domain.com
http://my-domain.com
WARNING: File descriptor limit 1024 is too low for production servers. At least 8192 is recommended. Fix with "ulimit -n 8192".
I tried to open it with firefox, nothing happens. Curl output is the same as before. 0 bytes in both access.log and errors.log
Setting setcap cap_net_bind_service=+ep /usr/local/bin/caddy
does not change anything too.
I am trying to get the static site at / to work fist before adding fastcgi /fm /var/run/php/php7.0-fpm.sock php
to get the wordpress site working. Any idea why it gives 301 error?
edit:
Hold on, tried curl -v my-domain.com
and I got port 80: Connection refused.
$ curl -v my-domain.com
* Rebuilt URL to: my-domain.com/
* Trying xx.xx.xx.xx...
* connect to xx.xx.xx.xx port 80 failed: Connection refused
* Failed to connect to my-domain.com port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to my-domain.com port 80: Connection refused
So I and changed the Caddyfile to
my-domain.com:80 {
root /var/www/html
log ../access.log
errors ../errors.log
}
```
... but https://my-domain.com won't connect.