Hi, firstly, I apologize if I missed some guide that answers my question here. Secondly, although I run my own server, I’m sadly not exactly an Apache and networking expert. Here’s my situation and what I’m struggling with:
I’d like to use SilverBullet on classic LAMP server (Linux, Apache, MySQL, PHP). I run Ubuntu 22.04 on the server (I plan to upgrade to 24.04 when the .01 release comes out), I own a domain (let’s say mydomain.org
), and I’d like to run SB in a subdirectory under the main domain. I’m also running other services on the server, such as Pico and Piwigo. I access everything via HTTPS and I have a certificate from LetsEncrypt.org.
I connected to the server via SSH and installed SB using Deno, used the steps here: Install/Deno . (BTW, I did succeed with these steps on my local machine running Kubuntu 24.04, I accessed SB via localhost:3000, as expected, everything worked.)
I installed it into, let’s say, /.../www/mydomain/notes/SB
and I’d like to access SilverBullet via https://mydomain.org/notes/SB
.
After installing SB in the said directory, I run silverbullet .
and it doesn’t complain about anything. But when I navigate to the directory via web browser, I see plain old directory listing. Accessing SB via local IP & port https://192.168.XXX.YYY:3000/notes/SB
doesn’t work either (I did allow the port in UFW).
(I’m just listing things I tried for completness sake.)
I gathered I need to set up a reverse proxy on Apache. I don’t have any experience with reverse proxying so I searched some guides and came up with this:
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPreserveHost On
ProxyPass /dir/SB/ https://127.0.0.1:3000/
ProxyPassReverse /dir/SB/ https://127.0.0.1:3000/
I added these lines to my /etc/apache2/sites-available/mydomain-le-ssl.conf
Apache site config.
Restarted the Apache server ($ sudo systemctl reload apache2.service
)
Now the address https://mydomain.org/notes/SB
says:
Proxy Error
The proxy server could not handle the request
Reason: Error during SSL Handshake with remote server
Here’s my cry for help: How do I set Apache up so that I can access SilverBullet via my domain, in a subdirectory, using secure connection (HTTPS)?
This may be relevant, I’m not sure:
My mydomain.conf
config file that lives alongside the above said ydomain-le-ssl.conf
contains general rules for <VirtualHost *:80>
:
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.mydomain.org [OR]
RewriteCond %{SERVER_NAME} =mydomain.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
The mydomain-le-ssl.conf
where I put all the reverse proxy options is for <VirtualHost *:443>
. I did try putting it into the main config that handles port 80 (HTTP), and it somewhat works but didn’t load any resources except the main index page (I’d say that’s correct because all gets redirected to HTTPS).
Thank you very much!