1. My Caddy version (caddy version
):
v2.0.0-rc.3 h1:z2H/QnaRscip6aZJxwTbghu3zhC88Vo8l/K57WUce4Q=
2. How I run Caddy:
mynextcloud. example.com:443 {
encode gzip
reverse_proxy 192.168.0.222:443
}
mynextcloud. example. com:80 {
encode gzip
reverse_proxy 192.168.0.222:80
}
and/or
mynextcloud. example.com {
encode gzip
reverse_proxy 192.168.0.222
}
a. System environment:
FreeNAS Jail
nextcloud is serving using Caddy v1
b. Command:
paste command here
c. Service/unit/compose file:
paste full file contents here
d. My complete Caddyfile or JSON config:
mywordpress. example. com {
root * /usr/local/www/wordpress
log /var/log/caddy_log.log
encode gzip
php_fastcgi 127.0.0.1:9000
# Prevent malicious PHP uploads from running
@uploads {
path_regexp path /uploads\/(.*)\.php
}
rewrite @uploads /
@wp-admin {
path not ^\/wp-admin/*
}
rewrite @wp-admin {path}/index. php?{query}
file_server
}
mynextcloud. example. com {
encode gzip
reverse_proxy 192.168.0.222
}
3. The problem I’m having:
I am getting this error
4. Error messages and/or full log output:
2020/05/01 12:39:54.282 ERROR http.log.access handled request {“request”: {“method”: “GET”, “uri”: “/csrftoken”, “proto”: “HTTP/2.0”, “remote_addr”: “13.240.21.236:51627”, “host”: “mynextcloud.example.com”, “headers”: {“Sec-Fetch-Mode”: [“cors”], “Accept-Encoding”: [“gzip, deflate, br”], “Cookie”: [“oc_sessionPassphrase=ltyBz4Fw505SdSMdbZWKJz7h5LnoyxaAETc3OaiNOs6u3lCIUqNrT2rJrfrhZz5QEowqNJD9j%2FTJSBtPmfL7yEsW2KPl70mNHPwG5IuMY3%2BHbH5%2FOCn4CoNptc2h4TOK; __Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; oclh1bbj34to=rhea66ecem4t7cuk73evhj41f2; nc_username=ilias; nc_token=EE3yTQbBUtQK63f4vgisIs9xffVPf9J5; nc_session_id=rhea66eeem4t7cuk73evhj41f2”], “Sec-Fetch-Site”: [“same-origin”], “Requesttoken”: [“kSSMyz2KnkpJToA8K6WshkjIa/hJtsRlOCPFR5CGOy4=:vlS88nrj1QcdIe9KaMr+0yaeDr4G/Iwqb0KTJP7eVH0=”], “X-Requested-With”: [“XMLHttpRequest”], “User-Agent”: [“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36”], “Ocs-Apirequest”: [“true”], “Sec-Fetch-Dest”: [“empty”], “Accept-Language”: [“en-US,en;q=0.9”], “Accept”: ["/"]}, “tls”: {“resumed”: false, “version”: 772, “ciphersuite”: 4867, “proto”: “h2”, “proto_mutual”: true, “server_name”: “mynextcloud.example.com”}}, “common_log”: “43.240.21.236 - - [01/May/2020:20:39:54 +0800] “GET /csrftoken HTTP/2.0” 502 0”, “latency”: 0.001126973, “size”: 0, “status”: 502, “resp_headers”: {“Server”: [“Caddy”]}}`
5. What I already tried:
I will open port 80 to port 443 back to nextcloud
I don’t know what to do next.
6. Links to relevant resources:
-none-
Sidenote : I have to add a space to above test. example. com because it keey saying “new user can put link 4 max”