Comments (4)
Interesting, I'll add the note about setting SERVER_URL
to the database. Webtrees is definitely a little finnicky about running behind a reverse proxy.
from webtrees-docker.
- I'm not sure if it's necessary anymore, I had this issue a long time ago setting up webtrees so I added that comment in case anyone else ran into it. The
http
was intentional, yes. At the time, it didn't like it when I set that tohttps
. In my own installation of webtrees behind a reverse proxy, I have bothLOGIN_URL
andSERVER_URL
set to the external address withhttps
and it works fine - I'm not sure, I haven't had any issues with Cloudflare needing to trust proxies
- That's only if you want the Apache server inside the container to serve the site via HTTPS. Really, I don't recommend this. I personally use Traefik as a reverse proxy in front of all my web apps to manage the SSL certificates with Let's Encrypt. If you really want to generate these, this answer on stackoverflow show be what you need, along with some file re-naming. Though, you're going to get self-signed certificate errors
PRETTY_URLS
doesn't do anything other make the URLs look nicer.HTTPS_REDIRECT
isn't necessary, but if you haveHTTPS
enabled, it redirects from HTTP to HTTPS automatically. You issue here likely isBASE_URL
. That absolutely must be the domain/hostname you're accessing webtrees by. For example with my own installation, while you could access it viahttp://localdockerip:80
I access it ashttps://webtrees.nathanv.app
, so I setBASE_URL
to that.- I'm not familiar with nginx, sorry.
- Anything that starts with
DB
is used every time you start the container to generate a config file for webtrees to connect to the database, so that's fine. It's anything that starts withWT
is used exactly once to initialize the database with the first user account. There's no changes needed there to externalize it. The only two things you might need to change areLOGIN_URL
andSERVER_URL
in the tablewt_site_setting
as discussed above. I'm not positive is webtrees changes this automatically from the config file.
My own docker-compose.yml
for reference:
version: '3'
services:
app:
env_file:
- ./.env
image: ghcr.io/nathanvaughn/webtrees:latest
labels:
- "traefik.enable=true"
- "traefik.http.routers.webtrees.rule=Host(`webtrees.nathanv.app`)"
- "traefik.http.routers.webtrees.service=webtrees"
- "traefik.http.services.webtrees.loadbalancer.server.port=80"
- "traefik.http.routers.webtrees.entrypoints=secure"
- "traefik.http.routers.webtrees.tls=true"
- "traefik.http.routers.webtrees.tls.certresolver=le"
- "traefik.http.routers.webtrees.tls.domains[0].sans=*.nathanv.app"
networks:
- db_net
- proxy_net
restart: unless-stopped
volumes:
- app_data:/var/www/webtrees/data/
- app_media:/var/www/webtrees/media/
- app_modules:/var/www/webtrees/modules_v4/
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
volumes:
app_data:
driver: local
app_media:
driver: local
app_modules:
driver: local
networks:
db_net:
external: true
proxy_net:
external: true
And .env
PRETTY_URLS=1
LANG=en-US
BASE_URL=https://webtrees.nathanv.app
DB_TYPE=mysql
DB_HOST=mariadb
DB_PORT=3306
DB_USER=webtrees
DB_PASS=<databasepassword>
DB_NAME=webtrees
DB_PREFIX=wt_
WT_USER=nathan
WT_NAME="Nathan Vaughn"
WT_PASS=<userpassword>
WT_EMAIL=<useremail>
from webtrees-docker.
Closing due to several months with no response
from webtrees-docker.
Hi Nathan,
I somehow missed all the replies. Just wanted to let you know that I eventually managed to make this work. The only thing I did were:
- Manually add
LOGIN_URL
to the database, and make it point tohttps://tree.mydomain.com
- Manually add
SERVER_URL
to the database, and make it point tohttps://tree.mydomain.com
- Set
BASE_URL
tohttps://tree.mydomain.com
- Set
PRETTY_URLS
to1
Thanks again for the support
from webtrees-docker.
Related Issues (20)
- After update fatal error HOT 1
- Can't get the application to run at all HOT 8
- Keep the plugins HOT 1
- Where are the webtree logs HOT 3
- Automatic log out HOT 2
- Allow max_execution_time adjustments HOT 2
- php.ini modifications HOT 2
- Can't start container HOT 6
- Run as a different user HOT 3
- docker-compose not working HOT 4
- SQLSTATE[HY000] [2002] No such file or directory (SQL: CREATE DATABASE IF NOT EXISTS HOT 7
- Issues with 2.1.16 (500 internal error) HOT 7
- media volume mounted incorrectely HOT 1
- database user and schema creation HOT 5
- Reverse proxy (i think) setup issue HOT 7
- Supplying user & password in variables does not work HOT 10
- Cant get this to run HOT 1
- Email not working after webtrees update 2.0.19 > 2.0.21 HOT 7
- Container restart resets config file permissions HOT 3
- Upgrade prompt is still shown
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webtrees-docker.