enable https

mobilizon 4.1 allows for self-signed root CAs
This commit is contained in:
André Menrath 2024-02-17 10:17:43 +01:00
parent 073b3af339
commit 04b590820f
3 changed files with 17 additions and 17 deletions

View file

@ -6,7 +6,6 @@ This repository helps you to set up a local Mobilizon and a local WordPress inst
- `make`
- `docker` and `docker-compose`
- `mkcert` to handle locally trusted SSL certificates.
- Currently we only support Debian and Arch based linux distributions.
### 1. Fetch the repository
```bash
@ -46,7 +45,7 @@ Currently this has to be done manually:
make admins
```
### 9. Start developing and debuggin
### 9. Start developing and debugging
Get the logs via
- `docker-compose logs -f <container_name>`
- `make logs`

View file

@ -61,6 +61,7 @@ services:
MOBILIZON_DATABASE_HOST: postgres
MOBILIZON_DATABASE_PORT: 5432
VITE_HOST: 0.0.0.0
MOBILIZON_CA_CERT_PATH: "/app/priv/ca-bundle.crt"
command: sh -c "mix phx.server"
expose:
- "443"

View file

@ -8,7 +8,7 @@ http {
server_name wp.lan;
listen 80;
# return 301 https://$server_name$request_uri;
return 301 https://$server_name$request_uri;
index index.php;
location / {
@ -19,23 +19,23 @@ http {
}
}
# server {
# server_name wp.lan;
# listen 443 ssl;
# http2 on;
server {
server_name wp.lan;
listen 443 ssl;
http2 on;
# ssl_certificate /etc/nginx/certs/lan.pem;
# ssl_certificate_key /etc/nginx/certs/lan-key.pem;
ssl_certificate /etc/nginx/certs/lan.pem;
ssl_certificate_key /etc/nginx/certs/lan-key.pem;
# index index.php;
index index.php;
# location / {
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_set_header Host $http_host;
# proxy_set_header X-Forwarded-Proto $scheme;
# proxy_pass "http://wordpress";
# }
# }
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass "http://wordpress";
}
}
server {
server_name mz.lan;