I am using version 0.10.6 and the current 502 Bad Gateway is only affecting my sub domain. Here is the Caddyfile
https://www.thedeveloper.club {
redir https://thedeveloper.club{uri}
}https://thedeveloper.club {
gzip
tls luisalvaradox@gmail.com
root /var/www/html/tdc/public
hugo /var/www/html/tdc {
flag bind 0.0.0.0
}
expires {
match .js$ 35m
match .css$ 35m
match .html$ 35m
match .jpg$ 35m
match .png$ 35m
match .svg$ 35m
match .woff$ 35m
}
basicauth /admin username password
errors {
* stderr
404 404.html
}
}https://store.thedeveloper.club {
gzip
tls luisalvaradox@gmail.com
root /var/www/html/store
ext .php .html .htm
fastcgi / 127.0.0.1:9000 php
expires {
match .js$ 35m
match .css$ 35m
match .html$ 35m
match .jpg$ 35m
match .png$ 35m
match .svg$ 35m
match .woff$ 35m
}
errors {
* stderr
404 404.html
}
}
When I add the https in the sub-domain store it fails giving me the 502 Bad Gateway.
My main domain is using hugo if that helps in any way, my store. sub domain is only using PHP.
Another 2 questions are:
I am getting the following in the terminal:
[WARNING] A database is going to be created for your Hugo instace at
/root/.caddy/hugo/48f0fbff97243a5e4e37e7e893ae5755.db. It is highly recommended that you set the ‘database’ option to ‘48f0fbff97243a5e4e37e7e893ae5755.db’
Where am I suppose to change the database option?
The last issue is this:
17/Aug/2017:16:28:02 +0000 [ERROR 502 /] dial tcp 127.0.0.1:9000: getsockopt: connection refused
17/Aug/2017:16:28:02 +0000 [NOTICE 502 /] could not load error page: open /var/www/html/store/stderr: no such file or directory
How can I fix this?
Hope this helps.