Installing passbolt under https://myUrl/passbolt

I’m using passbolt(2.0.0-rc2) in docker. I read that there are problem with this. Can someone tell me if there is a solution and how this solution looks like?

Hi @Sam !

I have seen that you created also this thread: Passbolt in docker behind reverse proxy
There is a known problem with pasbolt 1.x that won’t allow you to install passbolt on a subdirectory, however this issue is suppossed to be fixed with passbolt v2. Could you provide some more details on your setup?

  • What you did and what you expected
  • What happened (any logs here from nginx or passbolt would be appreciated)
  • Env variables used to launch passbolt and or configuration files

Thanks!

Just for clearing things out, when you say that you are using passbolt in docker means that you are using the passbolt official docker images?

Hey thanks for the answer.
I’m using this:passbolt_docker
So there is a nginx-reverse proxy with the following config-snippets:

upstream passbolt-docker {
# passbolt
server 172.18.0.2:80;
}
location /passbolt {
proxy_pass http-://passbolt-docker;
}

So calling https-://myURL/passbolt should proxy the request to the backend container(http-://172.18.0.2:80/passbolt)

I changed the passbolt env to:

URL

APP_FULL_BASE_URL=http-://myURL/passbolt/

Database settings

DATASOURCES_DEFAULT_HOST=mysqlPassbolt
DATASOURCES_DEFAULT_USERNAME=passbolt
DATASOURCES_DEFAULT_PASSWORD=P4ssb0lt
DATASOURCES_DEFAULT_DATABASE=passbolt

Misc

PASSBOLT_REGISTRATION_PUBLIC=true

When I start the container I set the following parameter:
-e “APP_FULL_BASE_URL=http-://myUrl/passbolt” and -e “PASSBOLT_SSL_FORCE=false”
What happen if I call the website:
I’m calling http-://myURL/passbolt and I see just plain text no style something like:
home
login

Almost there, please register!
. 
.
.

The links home or login pointing to https-://myURL and not to https-://myURL/passbolt
using the firefox webdeveloper tool I can see the following when I load the website:
GET http-://myUrl/css/login.min.css error 404 not found. Well because it should be http-://myUrl/passbolt/css…
The nginx error log in the passbolt container is empty. The access.log is this:
172.18.0.4 - - [21/Mar/2018:17:36:38 +0000] “GET /auth/login HTTP/1.1” 200 5569 “-” “Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0” “185.29.221.233”
172.18.0.4 - - [21/Mar/2018:17:38:14 +0000] “GET /auth/login HTTP/1.1” 200 5569 “-” “Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0” “185.29.221.233”
passbolt/logs-folder is empty

If you need any more information just tell me. My english is not so good. So I’m sorry for the bad text.

Kindly Regards

there is a “-” between http and : because I’m only allowed to post 2 links

Hi @Sam,

Thanks for your report!

There is a bug that has been patched already in pasbolt_api develop branch to install passbolt on a subdirectory and will be bundled on the next release. That includes correcting paths to the css for instance when the fullBaseUrl is pointing to a subdirectory.

The setup you are trying to use would require to make some changes to config/app.php to make css work with the current rc2 image. I would also suggest you to use a rewrite rule in the proxy_pass since passbolt docker image is an installation of passbolt on a / directory.

If you can’t wait you could try to rewrite urls in your proxy and modify app.php. This would be a possible solution:

upstream passbolt-docker {
# passbolt
    server 172.18.0.2:80;
}
location /passbolt {
  rewrite /passbolt/(.*) /$1 break;
  proxy_pass http://passbolt-docker;
}

And edit/mount a config/app.php inside passbolt container with the following section:

       'fullBaseUrl' => env('APP_FULL_BASE_URL', false),
       'imageBaseUrl' => 'your_subdirectory/img/',
       'cssBaseUrl' => 'your_subdirectory/css/',
       'jsBaseUrl' => 'your_subdirectory/js/',

This might not be the only solution but hope it helps in the meantime :slight_smile:

Hey @diego,
Thanks for the fast answer. I changed the things you mentioned. Now the site looks good. But after I created an admin account and set my password I can’t login. It says "loading, please wait… "
Firefox dev-tool is printing:
https-://myURL/js/app/steal.production.js 404 not Found
/passbolt is missing again. The links like Home and Login still pointing to https-://myUrl

Error loading this URL: Could not load the source for blob:https://myUrl/8a7d3213-1dad-4a4e-9d66-abdf32114f6c.
Error: Failed to fetch blob:https://myUrl/8b7d3213-1dad-4a4e-9d66-abdf51234g6c. Code 2152857618.

Do you have an other idea?

Ok I don’t know if there are more bugs but I had to change in

/var/www/passbolt/src/Template/Home/home.ctp

echo $this->html->script(‘/js/app/steal.production.js’);

to

echo $this->html->script(‘/passbolt/js/app/steal.production.js’);

Now I can use passbolt

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