Created
December 28, 2018 18:57
-
-
Save moosh3/f4319b7d0995fd1c338a4e13ee8b6e3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| example.com { | |
| tls [email protected] | |
| root /var/www/wordpress | |
| gzip | |
| fastcgi / /run/php/php7.2-fpm.sock php | |
| rewrite { | |
| if {path} not_match ^\/wp-admin | |
| to {path} {path}/ /index.php?{query} | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl https://getcaddy.com | bash -s personal http.cache,http.expires,http.filemanager,http.geoip,http.git,http.hugo,http.prometheus,http.ratelimit,http.upload,http.webdav,net,tls.dns.cloudflare | |
| sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy | |
| sudo groupadd -g 33 www-data | |
| sudo useradd \ | |
| -g www-data --no-user-group \ | |
| --home-dir /var/www --no-create-home \ | |
| --shell /usr/sbin/nologin \ | |
| --system --uid 33 www-data | |
| sudo mkdir /etc/caddy | |
| sudo chown -R root:root /etc/caddy | |
| sudo mkdir /etc/ssl/caddy | |
| sudo chown -R root:www-data /etc/ssl/caddy | |
| sudo chmod 0770 /etc/ssl/caddy | |
| wget https://raw.githubusercontent.com/mholt/caddy/master/dist/init/linux-systemd/caddy.service | |
| sudo cp caddy.service /etc/systemd/system/ | |
| sudo chown root:root /etc/systemd/system/caddy.service | |
| sudo chmod 644 /etc/systemd/system/caddy.service | |
| sudo systemctl daemon-reload | |
| sudo vim /etc/caddy/Caddyfile | |
| sudo systemctl start caddy.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment