Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site to Site WireGuard: HTTPS Services #28

Closed
11 tasks done
Xe opened this issue Apr 11, 2019 · 1 comment · Fixed by #33
Closed
11 tasks done

Site to Site WireGuard: HTTPS Services #28

Xe opened this issue Apr 11, 2019 · 1 comment · Fixed by #33
Assignees
Labels
Blogpost Queue Posts I have yet to write Site to Site WireGuard For the series

Comments

@Xe
Copy link
Owner

Xe commented Apr 11, 2019

  • Caddy
    • Installing Caddy with systemd
    • Simple page at aloha.pele
      • tls directive
      • markdown directive
      • internal directive
      • ext directive
    • URL shortener
      • Install surl
      • Create DNS entry
      • Create certificate
@Xe Xe added Blogpost Queue Posts I have yet to write Site to Site WireGuard For the series labels Apr 11, 2019
@Xe Xe self-assigned this Apr 11, 2019
@Xe
Copy link
Owner Author

Xe commented Apr 11, 2019

WireGuard Site to Site VPN Part 4 - HTTPS Services

And in that folder create a script called fixperms.sh:

#!/bin/sh
chmod -R 750 .
chown -R root:www-data .
chmod 600 minica-key.pem

Then mark it executable:

chmod +x fixperms.sh

These permissions are set as such:

Facet Read Write Execute/Directory Listing
User (root) Yes Yes Yes
Group (www-data) Yes No Yes
Others No No No

This will allow Caddy to be able to read the certificates later in the post.

HTTPS

Caddy is a general-purpose HTTP server. One of its main features is automatic Let's Encrypt support. We are using it here to serve HTTPS because it has a very, very simple configuration file format.

  • Caddy
    • Setup Caddy
      • Systemd
      • Certificate permissions
    • Configure Caddy for static file serving for aloha.pele
      • root directive
      • browse directive
    • Link to Caddy documentation
  • URL shortener
    • Decide domain
      • suggest
    • Install surl in Docker
      • Configuration
      • Create Docker volume
      • docker volume create surl
      • docker run --name surl -v surl:/data --restart always -dit xena/surl:v0.4.0
    • Create DNS entry
      • g.o. IN CNAME oho.pele.
    • Create TLS certificate
      • cd ~/backups/CA && minica -domains 'g.o'
    • Configure Caddy
      • g.o:80 {
      • tls off
      • redir / https://g.o
      • }
      • g.o:443 {
      •     tls /srv/within/certs/g.o/cert.pem /srv/within/certs/g.o/key.pem
        
      •     proxy / http://10.77.0.1:5000
        
      • }
    • Test
      • cURL
      • Safari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blogpost Queue Posts I have yet to write Site to Site WireGuard For the series
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant