How to install passbolt to IP/subfolder?

Hi,

I searched whole forum but couldn’t find a solution. I’m setting up a small business network and want to run passbolt and another web application on same host (still virtual machine). This host gonna be a local server so doesn’t have any domain / FQDN. That’s why I’m planing to use IP/subfolder for each app.

I setup a fresh ubuntu 18.04 to virtual machine. Then installed passbolt via documentations. Then I tried to change nginx to run passbolt on “IP/passbolt” but failed.

Here is my nginx config (/etc/nginx/conf.d/default.conf)

server {
listen 80;
server_name 192.168.0.38;

client_body_buffer_size 100K;
client_header_buffer_size 1K;
client_max_body_size 5M;

client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 5 5;
send_timeout 10;

location / {
return 410; #default root of site wont exist
}

location /passbolt {
root /var/www/passbolt/webroot;
index index.php;

try_files $uri $uri/ /index.php?$args;
}

}

Couldn’t run passbolt on IP/passbolt. Gives error 410.

did anyone try it before? I’d appreciate if you could show me how to.

Best regards,

K

Hello @kdrsrsln,

There is a ticket on the github that could help you to solve your issue.

Regards

Hello @cedric,

Thanks for reply and I also tried that solution. It works if I use FQDNs but not working when I tried with IP adresses. I added

‘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://10.10.0.244’,
// 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’ => ‘/passbolt’
],

since then I got an “HTTP ERROR 500” on 10.10.0.244 and 10.10.0.244/passbolt

Anything relevant in your logs/error.log file ? Can you share its content with us.

Hi @cedric,

Here is the error log. Gives the same error only.

2019-04-29 14:41:26 Error: Fatal Error (256): [Cake\View\Exception\MissingTemplateException] Template file “Error/error500.ctp” is missing.
#0 /var/www/passbolt/vendor/cakephp/cakephp/src/View/View.php(876): Cake\View\View->_getViewFileName(‘Error/error500’)
#1 /var/www/passbolt/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php(410): Cake\View\View->render(‘error500’, ‘error’)
#2 /var/www/passbolt/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php(375): Cake\Error\ExceptionRenderer->_outputMessageSafe(‘error500’)
#3 /var/www/passbolt/vendor/cakephp/cakephp/src/Error/ExceptionRenderer.php(244): Cake\Error\ExceptionRenderer->_outputMessage(‘error500’)
#4 /var/www/passbolt/src/Error/AppExceptionRenderer.php(40): Cake\Error\ExceptionRenderer->render()
#5 /var/www/passbolt/vendor/cakephp/cakephp/src/Error/ErrorHandler.php(137): App\Error\AppExceptionRenderer->render()
#6 /var/www/passbolt/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(193): Cake\Error\ErrorHandler->_displayException(Object(Cake\Core\Exception\MissingPluginException))
#7 /var/www/passbolt/vendor/cakephp/cakephp/src/Error/BaseErrorHandler.php(177): Cake\Error\BaseErrorHandler->handleException(Object(Cake\Core\Exception\MissingPluginException))
#8 [internal function]: Cake\Error\BaseErrorHandler->wrapAndHandleException(Object(Cake\Core\Exception\MissingPluginException))
#9 {main} in [/var/www/passbolt/vendor/cakephp/cakephp/src/Error/ErrorHandler.php, line 180]

Hello @kdrsrsln,

I’m not a sysop nor a nginx expert but I’m able to run passbolt in a directory with this nginx configuration

  root /var/www;
  location /passbolt {
    root /var/www/passbolt/webroot;
    rewrite     ^/passbolt$ /passbolt/ permanent;
    rewrite     ^/passbolt/(.+)$ /$1 break;
    try_files $uri $uri/ /passbolt/index.php?$args;
  }

More documentation is available in the CakePHP online cookbook: https://book.cakephp.org/3.0/en/installation.html

Thank you for your help. Now it’s working. Seems I missed some configuration on my nginx.

1 Like

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