404 not found error with apache fresh install

Checklist
[x] I have read intro post: About the Installation Issues category
[x] I have read the tutorials, help and searched for similar issues
[x] I provide relevant information about my server (component names and versions, etc.)
[x] I provide a copy of my logs and healthcheck
[x] I describe the steps I have taken to trouble shoot the problem
[ ] I describe the steps on how to reproduce the issue

OS: Debian 10 Buster
Webserver: Apache 2.4.38
Php: 7.3.19
Database: MariaDB 10.5.8
Passbolt: 2.13.5

My Healthcheck:

---------------------------------------------------------------
 Healthcheck shell
---------------------------------------------------------------

 Environment

 [PASS] PHP version 7.3.19-1~deb10u1.
 [PASS] PCRE compiled with unicode support.
 [PASS] The temporary directory and its content are writable.
 [PASS] The public image directory and its content are writable.
 [PASS] The logs directory and its content are writable.
 [PASS] GD or Imagick extension is installed.
 [PASS] Intl extension is installed.
 [PASS] Mbstring extension is installed.

 Config files

 [PASS] The application config file is present
 [PASS] The passbolt config file is present

 Core config

 [PASS] Debug mode is off.
 [PASS] Cache is working.
 [PASS] Unique value set for security.salt
 [PASS] Full base url is set to https://passwordmanager.staff.furiozia.net
 [PASS] App.fullBaseUrl validation OK.
 [FAIL] Could not reach the /healthcheck/status with the url specified in App.fullBaseUrl
  [HELP] Check that the domain name is correct in config/passbolt.php
  [HELP] Check the network settings

 SSL Certificate

 [FAIL] SSL peer certificate does not validate
 [FAIL] Hostname does not match when validating certificates.
 [WARN] Using a self-signed certificate

 Database

 [PASS] The application is able to connect to the database
 [PASS] 23 tables found
 [PASS] Some default content is present
 [PASS] The database schema up to date.

 GPG Configuration

 [PASS] PHP GPG Module is installed and loaded.
 [PASS] The environment variable GNUPGHOME is set to /var/www/.gnupg.
 [PASS] The directory /var/www/.gnupg containing the keyring is writable by the webserver user.
 [PASS] The server gpg key is not the default one
 [PASS] The public key file is defined in config/passbolt.php and readable.
 [PASS] The private key file is defined in config/passbolt.php and readable.
 [PASS] The server key fingerprint matches the one defined in config/passbolt.php.
 [PASS] The server public key defined in the config/passbolt.php (or environment variables) is in the keyring.
 [PASS] There is a valid email id defined for the server key.
 [PASS] The public key can be used to encrypt a message.
 [PASS] The private key can be used to sign a message.
 [PASS] The public and private keys can be used to encrypt and sign a message.
 [PASS] The private key can be used to decrypt a message.
 [PASS] The private key can be used to decrypt and verify a message.
 [PASS] The public key can be used to verify a signature.

 Application configuration

 [PASS] Using latest passbolt version (2.13.5).
 [PASS] Passbolt is configured to force SSL use.
 [PASS] App.fullBaseUrl is set to HTTPS.
 [PASS] Selenium API endpoints are disabled.
 [PASS] Search engine robots are told not to index content.
 [PASS] Registration is closed, only administrators can add users.
 [PASS] Serving the compiled version of the javascript app
 [PASS] All email notifications will be sent.

  3 error(s) found. Hang in there!

Hi ! I was installing passbolt with this guide: Passbolt Help | Install passbolt API from source and i’m unable to access to the website :confused:

I tried every solution found here and elsewhere but nothing worked so far…

Here is my last vhost:

<VirtualHost *:80>
    ServerName passwordmanager.staff.furiozia.net
    Redirect permanent / https://passwordmanager.staff.furiozia.net/
</VirtualHost>

<VirtualHost *:443>
    ServerName "passwordmanager.staff.furiozia.net"
    DocumentRoot /appli/prod/passwordmanager.staff.furiozia.net

    ErrorLog /var/log/apache2/passwordmanager.staff.furiozia.net-error.log
    CustomLog /var/log/apache2/passwordmanager.staff.furiozia.net-access.log combined

    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/passwordmanager.staff.furiozia.net/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/passwordmanager.staff.furiozia.net/privkey.pem

    <Directory "/appli/prod/passwordmanager.staff.furiozia.net">
        RewriteEngine on
        Options FollowSymLinks
        AllowOverride
        DirectoryIndex index.php
        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>

And here was my vhosts before:

<VirtualHost *:80>
    ServerName passwordmanager.staff.furiozia.net

    DocumentRoot /appli/prod/passwordmanager.staff.furiozia.net/

    ErrorLog /var/log/apache2/passwordmanager.staff.furiozia.net-error.log
    CustomLog /var/log/apache2/passwordmanager.staff.furiozia.net-access.log combined

    <Directory "/appli/prod/passwordmanager.staff.furiozia.net/">
        AllowOverride
        DirectoryIndex index.php
        Require all granted
    </Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =passwordmanager.staff.furiozia.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName "passwordmanager.staff.furiozia.net"

    DocumentRoot /appli/prod/passwordmanager.staff.furiozia.net

    ErrorLog /var/log/apache2/passwordmanager.staff.furiozia.net-error.log
    CustomLog /var/log/apache2/passwordmanager.staff.furiozia.net-access.log combined

    SSLEngine on
    SSLCertificateFile /etc/letsencrypt/live/passwordmanager.staff.furiozia.net/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/passwordmanager.staff.furiozia.net/privkey.pem

    <Directory "/appli/prod/passwordmanager.staff.furiozia.net">
        RewriteEngine  on
        Options FollowSymLinks
        AllowOverride
        DirectoryIndex index.php
        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>

But it never worked neither

Could you help me ?

Hi @furiozia welcome to the forum!

I think your DocumentRoot is incorrect. It should point to the passbolt/webroot path, wherever you have installed that.

Hi and Thank you @garrett ! :smiley:

I’ve double checked every times i needed to set a directory and i haven’t found anything

Here is the beginning of my passbolt configuration file:

'App' => [
        // A base URL to use for absolute links.
        // The fully qualified domain name (including protocol) to your application’s root
        // e.g. where the passbolt instance will be reachable to your end users.
        // This information is need to render images in emails for example.
        'fullBaseUrl' => 'https://passwordmanager.staff.furiozia.net',
        // OPTIONAL you can specify the base directory the app resides in
        // usefull for example if you are running passbolt in a subdirectory like localhost/passbolt
        // Ensure your string starts with a / and does NOT end with a /
        // 'base' => '/subdir'
    ],

The directory also have user and group www:data set with 777 permissions

@furiozia Do you have the mod_rewrite module enabled?

@furiozia here is an example of working apache configuration:

<IfModule mod_ssl.c>
	<VirtualHost _default_:443>
		ServerAdmin webmaster@localhost
		ServerName www.passbolt.test
		DocumentRoot /var/www/passbolt/webroot

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

		SSLEngine on
		SSLCertificateFile    /etc/apache2/ssl/passbolt.crt
		SSLCertificateKeyFile /etc/apache2/ssl/passbolt.key

		<FilesMatch "\.(php)$">
				SSLOptions +StdEnvVars
		</FilesMatch>
	
        <Directory /var/www/passbolt/webroot>
            Options FollowSymLinks
            AllowOverride All
            Require all granted
        </Directory>

	</VirtualHost>
</IfModule>

As garrett mentinned you need to have mod rewrite enabled.

Hi again ! I made some modification to your example and it worked ! I can now access to the website, Thanks @garrett @remy for your help :+1: and shame on me for mixing vhost configuration files !

I’m posting the final configuration file that’s works for me:

<IfModule mod_ssl.c>

        <VirtualHost _default_:443>
                ServerAdmin webmaster@furiozia.net

                ServerName passwordmanager.staff.furiozia.net

                DocumentRoot /appli/prod/passwordmanager.staff.furiozia.net



                ErrorLog /var/log/apache2/passwordmanager.staff.furiozia.net-error.log

                CustomLog /var/log/apache2/passwordmanager.staff.furiozia.net-access.log combined



                SSLEngine on

                SSLCertificateFile    /etc/letsencrypt/live/passwordmanager.staff.furiozia.net/fullchain.pem

                SSLCertificateKeyFile /etc/letsencrypt/live/passwordmanager.staff.furiozia.net/privkey.pem



                <FilesMatch "\.(php)$">

                                SSLOptions +StdEnvVars

                </FilesMatch>



        <Directory /appli/prod/passwordmanager.staff.furiozia.net>

            Options FollowSymLinks

            AllowOverride All

            Require all granted

        </Directory>



        </VirtualHost>

</IfModule>