I’m setting up a local dev environment on my Windows 7 workstation. Nothing crazy just a way to make sure scripts pulled in through a <script>
tag load as expected.
I’m using what I believe to be correct for my caddyfile based on the docs here – https://caddyserver.com/tutorial/caddyfile
# This is a super dumb caddyfile
:8888
http://jQuery.test { # naturally not a real TLD but no matter how this changes I get a parse error when I run caddy on the commandline
root c:\tools\jQuery_exp # this has an index.html so it should show something
}
The text of the error:
2019/03/06 11:45:03 Caddyfile:3 - Error during parsing: Unknown directive 'http://jQuery.test'
I looks like I can stack the site definitions, but the parse error above is ever present. I’m sure I’m missing something, but I’m not certain what.
Addendem - 2019-03-06-1227
I also tried the following in the caddyfile and got past the parse error but still didn’t get to my index file
http://jQuery.test:8888 {
root c:\tools\jQuery_exp
}
– 2019-03-06-1240 –
I was looking a few other caddy files here on the forum and though I’d try one more thing
*.xxxxxx.test:8888{
jQuery.xxxxxx.test {
root c:\tools\jQuery_exp
}
}
and got the following response:
2019/03/06 12:39:18 Caddyfile:2 - Error during parsing: Unknown directive 'jQuery.calpet.test'
Ok one last thing then I’ll stop for awhile.
Tried this caddyfile:
http://jQuery.calpet.test {
root c:\tools\jQuery_exp
proxy / localhost:8000 {
transparent
}
}
No parse error!
But the output at the terminal says:
λ caddy
Activating privacy features... done.
Serving HTTP on port 80
http://jquery.calpet.test
But I told it to be on port 8000