Bonjour,
J’essaie sans succès à accéder à vikunja depuis internet. J’ai suivi le tuto sans proxy et je passe en https.
Config sous apache :
<VirtualHost *:80>
ServerName <MON-SITE>
RewriteEngine on
RewriteCond %{SERVER_NAME} =<MON-SITE>
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
SSLEngine on
ServerName <mon-site>
SSLCertificateFile /etc/letsencrypt/live/<mon-site>/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<mon-site>/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ErrorLog ${APACHE_LOG_DIR}/localhost_error.log
CustomLog ${APACHE_LOG_DIR}/localhost_access.log combined
<Directory /opt/vikunja/files>
Require all granted
</Directory>
<Proxy *>
Order Deny,Allow
Allow from all
</Proxy>
ProxyPass /api http://localhost:3456/api
ProxyPassReverse /api http://localhost:3456/api
ProxyPass /dav http://localhost:3456/dav
ProxyPassReverse /dav http://localhost:3456/dav
ProxyPass /.well-known http://localhost:3456/.well-known
ProxyPassReverse /.well-known http://localhost:3456/.well-known
DocumentRoot /opt/vikunja/files
RewriteEngine On
RewriteRule ^\/?(favicon\.ico|assets|audio|fonts|images|manifest\.webmanifest|robots\.txt|sw\.js|workbox-.*|api|dav|\.well-known) - [L]
RewriteRule ^(.*)$ /index.html [QSA,L]
</VirtualHost>
</IfModule>
Et le docker-compose :
version: '2'
services:
api:
image: vikunja/api:latest
environment:
VIKUNJA_DATABASE_HOST: db
VIKUNJA_DATABASE_PASSWORD: <pwd>
VIKUNJA_DATABASE_TYPE: mysql
VIKUNJA_DATABASE_USER: vikunja
VIKUNJA_SERVICE_JWTSECRET: <pwd>
VIKUNJA_SERVICE_FRONTENDURL: https://<mon-url-public>/
volumes:
- /opt/vikunja/files:/app/vikunja/files
ports:
- 3456:3456
depends_on:
- db
restart: unless-stopped
db:
image: mariadb:10
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
MYSQL_ROOT_PASSWORD: <pwd>
MYSQL_USER: vikunja
MYSQL_PASSWORD: <pwd>
MYSQL_DATABASE: vikunja
volumes:
- /opt/vikunja/db:/var/lib/mysql
frontend:
image: vikunja/frontend
ports:
- 806:80
environment:
VIKUNJA_API_URL: http://<IP-PUBLIC>:3456/api/v1
restart: unless-stopped
Et l’url dans index.html :
window.API_URL = 'https://<url-public>/api/v1'
J’ai essayé pas mal de choses mais avec cette config, les 2 requêtes qui ne passent pas sont api/v1/info (443 et 3456).
Je comprends grossièrement apache et ses concepts associés mais ne me sent pas à l’aise. Toute explication est bienvenue