Caddy: Can't start server without arguments in Windows 10

Created on 30 Jan 2017  Â·  10Comments  Â·  Source: caddyserver/caddy

(Are you asking for help with using Caddy? Please use our forum instead: https://forum.caddyserver.com. If you are filing a bug report, please answer the following questions. If your issue is not a bug report, you do not need to use this template. Either way, please consider donating if we've helped you. Thanks!)

1. What version of Caddy are you running (caddy -version)?

Caddy 0.9.5 with Windows 10

2. What are you trying to do?

Start the server as indicated in the documentation - without arguments in the working directory on a Windows 10 machine.

See: https://forum.caddyserver.com/t/cant-start-server/1357

3. What is your entire Caddyfile?

None.

4. How did you run Caddy (give the full command and describe the execution environment)?

caddy

5. What did you expect to see?

Expected the server to start and server index.html from that directory.

6. What did you see instead (give full error messages and/or log)?

PS C:\Users\fdavidso2\web_projects\firstelement> caddy
2017/01/30 09:55:51 The filename, directory name, or volume label syntax is incorrect.

7. How can someone who is starting from scratch reproduce this behavior as minimally as possible?

Probably with the same set up, I would think...

bug

Most helpful comment

@jstevenson72 this fix will likely ship with the next release of caddy in the meantime you will need to make sure there is a file called Caddyfile in the same directory or you specify one using the -conf cl parameter.

You can create a blank Caddyfile and it will have the same behaviour as if you had no caddyfile in the directory, but it won't cause the error in 0.9.5

All 10 comments

Try, if you can start caddy not in powershell, but instead in normal command line (and maybe with admin rights).

Hmmm... Put the root into the caddy file and now it tries to run, but get this error:

PS C:\Users\fdavidso2\web_projects\firstelement> caddy -conf='C:\Users\fdavidso2\web_projects\firstelement\caddyfile'
Activating privacy features...2017/01/30 11:08:58 [root] failed to get certificate: acme: Error 400 urn:acme:error:malformed - DNS name does not have enough labels

Can you provide the contents of caddyfile ?

I'll close this for now @davidsonff feel free to provide more info if you are still having the issue

@davidsonff The first line of the Caddyfile must always be the address of the site to serve. Does it run from normal cmd?

I have the same error but on Windows 7 64bit Enterprise.

Just starting Caddy 0.95 in any folder caddy (no Caddyfile specified) results in this error message:
2017/02/13 10:48:06 The filename, directory name, or volume label syntax is incorrect.

Doing the same with Caddy 0.94 or below runs just fine.

This happens in CMD, Powershell and cmder.

Does anyone have Windows that can look into debugging this? Maybe git bisect would be useful?

I'll try to track it down

I had the exact same issue on Windows 10 Server 2016. It only worked with
this command: "caddy -conf c:caddycaddy"

On Mon, Feb 13, 2017 at 1:43 PM Toby Allen notifications@github.com wrote:

I'll try to track it down

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mholt/caddy/issues/1388#issuecomment-279500352, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABgCQuLK6B89WanXqO2-VOTh5NJzQAVaks5rcLJ6gaJpZM4Lxftc
.

@jstevenson72 this fix will likely ship with the next release of caddy in the meantime you will need to make sure there is a file called Caddyfile in the same directory or you specify one using the -conf cl parameter.

You can create a blank Caddyfile and it will have the same behaviour as if you had no caddyfile in the directory, but it won't cause the error in 0.9.5

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dafanasiev picture dafanasiev  Â·  3Comments

wayneashleyberry picture wayneashleyberry  Â·  3Comments

mschneider82 picture mschneider82  Â·  3Comments

mikolysz picture mikolysz  Â·  3Comments

mholt picture mholt  Â·  3Comments