Help for classic installation of Vikunja

Hi,

I tried to install Vikunja in the classic way in following the documentation for backend and frontend but when I tried to access to vikunja, the frontend cannot find the backend.

My configuration of the apache config file is the following :

<VirtualHost *:80>
    ServerName my_website_address.com
    Redirect permanent / https://my_website_address.com
#    Alias / "/var/www/vikunja/

    <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

    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/
    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>

<VirtualHost *:443>
    ServerName my_website_address.com
    DocumentRoot /var/www/vikunja/

    SSLEngine on
    # curl https://ssl-config.mozilla.org/ffdhe2048.txt >> /path/to/signed_cert_and_intermediate_certs_and_dhparams
    SSLCertificateFile      /etc/letsencrypt/.../fullchain.pem
    SSLCertificateKeyFile   /etc/letsencrypt/.../privkey.pem

    # enable HTTP/2, if available
    Protocols h2 http/1.1

    # HTTP Strict Transport Security (mod_headers is required) (63072000 seconds)
    Header always set Strict-Transport-Security "max-age=63072000"
</VirtualHost>

# intermediate configuration
SSLProtocol             all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite          ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA>
SSLHonorCipherOrder     off
SSLSessionTickets       off

SSLUseStapling On
SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"

What can I do to make the website works ?

Thank you in advance.

Can you reach the api at https://my_website_address.com/api/v1/info in your browser?

No I can’t !

When I try to reach it, my browser tell me 404 not found.

Is that error message coming from apache? (There should be something in the logs in that case)

Can you reach the api locally via curl (on the same server) at http://localhost:3456/api/v1/info?

Is there anything in the api logs? Is the service running and healthy?

Here below what I got when I used the curl command :

{"version":"v0.20.1","frontend_url":"","motd":"","link_sharing_enabled":true,
"max_file_size":"20MB", "registration_enabled":true,"available_migrators":["vikunja-file","ticktick"],
"task_attachments_enabled":true,"enabled_background_providers":["upload"],"totp_enabled":true,
"legal":{"imprint_url":"","privacy_policy_url":""},
"caldav_enabled":true,"auth":{"local":{"enabled":true},"openid_connect":{"enabled":false,
"redirect_url":"\u003cfrontend url\u003e","providers":null}},
"email_reminders_enabled":true,"user_deletion_enabled":true,"task_comments_enabled":true}

That looks like the api itself works. Can you check the apache logs?

I checked the apache log (/var/log/apache2/) and there are nothing relevant…

However, I can’t enable vikunja website when I have the Proxy lines in the configuration file.
So I need to comment this part to be enable the website :

  #  <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

Maybe you need to enable the Apache proxy module?

Indeed, the module proxy was not activated. So I can enable the website with proxy lines now.
Yet, still have the same problem of communication between frontend and backend.

And you can reach the api at https://my_website_address.com/api/v1/info?

Yes I still can access to the api.
Here below what I got when use the curl command :

{"version":"v0.20.1","frontend_url":"","motd":"","link_sharing_enabled":true,"max_file_size":"20MB",
"registration_enabled":true,"available_migrators":["vikunja-file","ticktick"],"task_attachments_enabled":true,
"enabled_background_providers":["upload"],"totp_enabled":true,"legal":{"imprint_url":"","privacy_policy_url":""},
"caldav_enabled":true,"auth":{"local":{"enabled":true},
"openid_connect":{"enabled":false,"redirect_url":"\u003cfrontend url\u003e","providers":null}},
"email_reminders_enabled":true,"user_deletion_enabled":true,
"task_comments_enabled":true}

And does it work if you enter https://my_website_address.com/api/v1/ as the api url?

Unfortunately not ! Still 404 error…

Which API url did you configure?

In the config.yml file, I put in the parameter frontendurl : https://my_website_address.com/

This file is in the folder where unzip the backend archive folder.

I tried to replace this url with https://my_website_address.com/api/v1 but it doesn’t work either.

Did you configure an api url in the index.html file of the frontend? If not, are you accessing the frontend via https://my_website_address.com?

I did not configure any address in the index.html. I let ‘api/v1’ in the field for the frontend url.

Yes, right now I access to the frontend via https://my_website_address.com

That should work. Can you open the dev tools’ network tab, filter for requests containing “api” and then reload the page? Can you then check the filtered requests for errors and their responses?

I opened the network tab and here below errors that is displayed:

NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SECURITY, SSL_ERROR_RX_RECORD_TOO_LONG)

Which URL does that request go to? Any other requests?