How do I disable autostart caddy service?


(Milad Ranjbar) #1

i used this command to stop caddy from auto start sudo update-rc.d -f caddy disable but ubuntu said update-rc.d: /etc/init.d/caddy: file does not exist

how can i stop autostart caddy during startup.


(Matthew Fay) #2

Hi @Milad_ranjbar,

This depends a lot on which version of Ubuntu you’ve installed and how you configured Caddy to auto start in the first place. Caddy itself doesn’t set up any kind of automatic start, except when you use the hook.service plugin: https://caddyserver.com/docs/hook.service

Perhaps this link might be helpful:


(Milad Ranjbar) #3

ok thanks. and another problem i have a wordpress site and config caddy according to example for wordpress on github, but when an ajax request made broswer tell me also to note i turn off tls:

1. Request URL:
http://www.abc.com/wp-admin/admin-ajax.php
2. Request Method:
POST
3. Status Code:
503 Service Unavailable
4. Remote Address:
1.2.3.4:80
5. Referrer Policy:
**strict-origin-when-cross-origin**

(Matthew Fay) #4

Are you going off this example? https://github.com/caddyserver/examples/tree/master/wordpress

If so, are you running the PHP-FPM listener on port 9000?


(Milad Ranjbar) #5

yes of course, i mean my wordpress site work but some parts of it that need ajax request, i have problem.

maybe i should enable cors ?


(Matthew Fay) #6

Could you enable site access and error logs (with log /path/to/caddy/access.log and errors /path/to/caddy/errors.log), make an access attempt, and see what you get?