English Forums > Tutorials and FAQs

Caddy Proxy - Install and Use

<< < (2/3) > >>

mimugmail:
I for myself always change it to port 4444 so 443 is free to use :)
Can you check if there is a file called caddy in /usr/local/etc/rc.d/?

jcdick1:
Yes, I copied the file from <extraction location>/init/freebsd into /usr/local/etc/rc.d/ per the guide, modifying it for my Cloudflare account info environment variables.

jcdick1:
I did finally manage to at least get the caddy command to kick off.  I had to go in and change the /usr/local/etc/rc.d/caddy init script to executable.

Now I have to figure out why it won't stay running and how to get a readable log file explaining what's killing it.  The log file entry in the caddy init script in the example provided in this thread


--- Code: ---: ${caddy_logfile="/var/lib/caddy/logs/caddy.log"}
--- End code ---

does not seem to create a log file.  Perhaps its a version difference and this variable was deprecated, as the comments section above these variables in my version does not include that entry.  Instead it is:


--- Code: ---# caddy_syslog_facility (str) Set to "local7" by default.
#                             Defines the syslog facility used to log output from the caddy process.
#                             This is NOT the web access log.
#
# caddy_syslog_level (str)    Set to "notice" by default.
#                             Defines the syslog level used to log output from the caddy process.
#                             This is NOT the web access log.

...

: ${caddy_syslog_facility="local7"}
: ${caddy_syslog_level="notice"}


--- End code ---

However, there is no useful information regarding Caddy's failure in system.log or any other log I can see.  I am not getting a caddy.log file generated anywhere.

guest15389:
If you check my example above, you need to use the log file directive in your Caddyfile and write the log somewhere.

jcdick1:
I do have a


--- Code: ---log /var/lib/caddy/caddyservice.log
--- End code ---

in my /var/lib/caddy/Caddyfile, as well as the aforementioned


--- Code: ---: ${caddy_logfile="/var/lib/caddy/caddy.log"}
--- End code ---

in the init script.  There are no log files being generated that I can see in either location.  Nor anything in system logs in /var/log to indicate what's killing the process.

I guess I try running it directly from the command line, with various options to see if it logs its failure to the console.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version