I am running a docker-compose of vikunja and all the services work well in my local network (db, api, frontend, proxy), my compose yml file is below.
services:
db:
image: mariadb:10
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: supersecret
MYSQL_USER: vikunja
MYSQL_PASSWORD: secret
MYSQL_DATABASE: vikunja
volumes:
- ./db:/var/lib/mysql
restart: unless-stopped
####
api:
image: vikunja/api
environment:
VIKUNJA_DATABASE_HOST: db
VIKUNJA_DATABASE_PASSWORD: secret
VIKUNJA_DATABASE_TYPE: mysql
VIKUNJA_DATABASE_USER: vikunja
VIKUNJA_DATABASE_DATABASE: vikunja
VIKUNJA_SERVICE_JWTSECRET: supersecret
VIKUNJA_SERVICE_FRONTENDURL: http://vikunja.myurl.com/
ports:
- 3456:3456
volumes:
- ./files:/app/vikunja/files
depends_on:
- db
restart: unless-stopped
###
frontend:
image: vikunja/frontend
ports:
- 8081:80
environment:
VIKUNJA_API_URL: http://192.168.40.200:3456/api/v1
restart: unless-stopped
proxy:
image: nginx
ports:
- 75:80 #<== custom port
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
depends_on:
- api
- frontend
restart: unless-stopped
I want to make my installation available from outside my LAN, and since my server runs apache, I figure I could use apache as my reverse proxy to route my url ( http://vikunja.myurl.com/ ) to the Nginx proxy server that Vikunja is using (in my case in localserver port 75). I created an apache conf as below,
<VirtualHost *:80>
ServerName vikunja.myurl.com
# reverse proxy
RewriteEngine on
ProxyPreserveHost On
ProxyRequests Off
AllowEncodedSlashes On
ProxyPass / http://localhost:75/
ProxyPassReverse / http://localhost:75/
</VirtualHost>
But my url http://vikunja.myurl.com/ fails to properly load the login page (it is stuck on loading). If I use the url in my local network, it works without issues.
Am I doing something wrong with the apache config file? Thanks for the help.