sergix44 / XBackBone

A lightweight file manager with full ShareX support and more
https://xbackbone.app
GNU Affero General Public License v3.0
993 stars 81 forks source link

Multiple Domains? #487

Open benz44 opened 2 years ago

benz44 commented 2 years ago

I have read removing base url gives the possibility to use multiple domains. https://github.com/SergiX44/XBackBone/issues/257 but with the new added domain i got: 500 Internal Server Error Unexpected error while handling the request.

regards

bacitoto commented 1 year ago

Thanks it worked fine here! But.....is there a neater way to do this? I keep getting redirected to the /login page and it also ruins the copy url function

Using docker so my path was at /config/www/xbackbone/config.php Delete only the url from the config, leaving it blank

<?php
return array (
  'base_url' => '',
  'db' =>
  array (
    'connection' => 'sqlite',
    'dsn' => '/config/www/xbackbone/resources/database/xbackbone.db',
    'username' => NULL,
    'password' => NULL,
  ),
  'storage' =>
  array (
    'driver' => 'local',
    'path' => '/config/www/xbackbone/storage',
  ),
);
xamionex commented 1 year ago

If anyone's having issues with it working but whenever someone downloads the client script for sharex it sends out http instead of https, I managed to make https manual whilst making domain dynamic: 'base_url' => "https://".$_SERVER['SERVER_NAME']

sergix44 commented 1 year ago

You can remove the base_url from the config and XBB will use any domain you are contacting it

bacitoto commented 1 year ago

edit: Problem is when using mydomain.com, files will have mydomain.com on it's url and can be shared. But if I use local ip to access XBB, files will have local url and therefore won't be sharable :( (unless I manually change the url before sending the link)

I was looking for local ip access and share files with mydomain.example

xamionex commented 1 year ago

edit: Problem is when using mydomain.com, files will have mydomain.com on it's url and can be shared. But if I use local ip to access XBB, files will have local url and therefore won't be sharable :( (unless I manually change the url before sending the link)

I was looking for local ip access and share files with mydomain.example

You use a program for capturing for that (ShareX)

bacitoto commented 1 year ago

Either using sharex or via web browser the result is the same. If I use cloudflare proxy, upload speed drops tremendously because it's not uploading locally.

I want to upload files locally, because it's faster, but have said files with an external ip/domain link to share. I'm think I can edit the config file that attributes links to uploads, and changing the default url (url that I'm using to access XBB) to mydomain.com

dmitrygribenchuk commented 1 year ago

Hey. Looking the solution for the same situation with multi-domain: The first domain - for uploading and sharing screenshots: share.example.com (available from the Internet) The second - is for manual uploads and manage: manage.example.com (available only with x509 client certificate)

The main problem is: impossible to copy the image URL like share.example.com when I open manage.example.com (it's copy only the current domain).