2.7.1: 404 UI errors with apache 2.4


#1

Hi,

  • I installed passbolt 2.7.1 on ubuntu 18.04 with mysql and apache 2.4.x
  • installation, cert registration etc. finished properly
  • health check is OK
  • registration of admin user through web UI finished properly
  • after all, login page still shows 404 errors, example:

GET /passbolt/index.php/passbolt/css/themes/default/api_main.min.css?v=2.7.1

HTTP/1.1 404 Not Found

Same with the

GET /passbolt/index.php/passbolt/js/app/steal.production.js?v=2.7.1 HTTP/1.1

The fullBaseUrl’ is 'https:[servername]/passbolt/index.php

I assume some configuration is missing with the redirect to /var/www/passbolt/webroot/
But there is no proper documentation on this, only some stubs for nginx, not for apache. Any hints?

Thx, Thommie


#2

Hi @Thommie,
Did you install passbolt using the automated script? (with this tutorial: https://help.passbolt.com/hosting/install/ce/ubuntu-18-04-bionic-beaver.html)

I suspect that your fullBaseUrl is not correct in your config. It should be https:[servername]/passbolt, and I’d recomment to use a hostname / domain rather than have it in a subdirectory.

Below is an example of an apache configuration for passbolt:

<IfModule mod_ssl.c>
    <VirtualHost _default_:443>
        ServerAdmin webmaster@localhost
        ServerName passbolt.dev

        DocumentRoot /var/www/passbolt

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl/apache.crt
        SSLCertificateKeyFile /etc/apache2/ssl/apache.key
 
        <Directory /var/www/passbolt>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>
    
        <FilesMatch “\.(php)$”>
            SSLOptions +StdEnvVars
        </FilesMatch>

        BrowserMatch “MSIE [2–6]” \
          nokeepalive ssl-unclean-shutdown \
          downgrade-1.0 force-response-1.0
        BrowserMatch “MSIE [17–9]” ssl-unclean-shutdown

    </VirtualHost>
</IfModule>

If it’s still not working after that, then if you could copy / paste the network activity happening in your console, that would help.

Cheers,


#3

Hi, thanks for the fast reply. The only thing I had NOT in my apache config, was the ```
Options FollowSymLinks directive …

My fullBaseUrl is
‘fullBaseUrl’ => ‘https://devel.netzwissen.de/passbolt/index.php’,

I also tried without the index.php as the apache has the DirectoryIndex already and redirects automatically to it

If I call passbolt with a clean firefox profile with active passbolt addon, the index.php answers with a successful code 302, then it redirects to https://devel.netzwissen.de/passbolt/index.php/passbolt/auth/login. The double …/passbolt/index.php/passbolt/ path is wrong, I believe this is the root cause of the 404s in the UI.

hmmm…

Hostname: up to now I would like to keep the subdir config, only if its NOT possible at all, I would switch to a separate hostname… But I saw installations with subdir, so it should be possible in general.

Thx, Thommie


#4

@Thommie there are some issues with subdir installation. See. https://github.com/passbolt/passbolt_api/issues/252 . If you insist on using a subdir you should remove the directory from fullBaseUrl (as it is added automatically by the framework we use). This will cause issues however in emails for example. It’s better to use a subdomain or different domain name otherwise the overall experience will be impaired.


#5

This is something I want to fix in the next version btw.


#6

yep, removing the …/passbolt/ from the fullbaseURL helped. This was the thing that puzzled me: normally the BaseURL of a php app is the full URI path including the subdir… Maybe its better to include an info on this, I see a lot off issues with the fullbaseURL online …

But I understand the problems with the subdirs, I will switch to a subdomain-based setup (e.g. passbolt.netzwissen.de) as soon as possible.


closed #7

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.