Web Interface and Apache

Is there a good way to use the Web interface with Apache any ProxyPass? I already have a fairly well set up infrastructure with a whole bunch of services well accessable from a single port.

Is this possible? Has anyone done it?

I have the existing code here: http://pastie.org/pastes/9364509/text (Markdown doesn’t like posting code for me)

When I load the web page with this config, I get the Syncthing symbol in the tab, but a white background. I do seem to get the page source as I should. So maybe some scripting doesn’t like the proxy? Any ideas?

i’m doing this with a .htacces file placed in the folder syncthing of the www-root

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteRule ^(.*) http://localhost:8080/$1 [P] #replace 8080 if you have another port

Don’t forget to set the url in syncthing too, see https://github.com/calmh/syncthing/issues/166

@calmh: is the way of defining custom urls defined somewhere? I can’t find it in the gui either :confused:


That looks like its just a feature request. It looks like they changed how some absolute variables were called, but thats about it.

Alex: I have that set up, but it returns the same white screen.

for me exactly this .htaccess i posted works, currently with syncthing v0.8.18. Gui listen address of syncthing is

That issue was closed by making it unnecessary. All links in syncthing are relative, so there is no need for syncthing to know which URL it’s being served on. Hence the rewrite etc above works out of the box.

1 Like

Thanks for that :slight_smile: @@

It occurs to me that perhaps I don’t have the right modules enabled or I don’t know what exactly needs to be changed.

I have the right modules for proxy forwarding (because Deluge is working).

Do I need JUST this .htaccess? or do I need things in http-vhosts.conf as well?

If I have a password on the gui, do I need to forward that too somehow?