Webinterface SSL, incomplete opening of the site on Debian 9

Hi,
some time ago I successfully set up several servers with webinterface access via https on Debian Jessie (urbackup-server 2.0.32 probably).
However, in the latest Debian Stretch (stable OS fresh installation with Apache 2.4.25 and urbackup-server 2.1.19), the webinterface is loaded partially only.


There is nothing more happening than you can see on the picture above (progress indicator rotates).
I ask for help, how to fix it?

Regards,
Arek

And an update:
I used nginx instead of apache, and now https connection works correctly :slight_smile:

I think the issue here is that fastcgi behaves differently in Stretch. There is a new proxy module.

IMO you are right. I noticed, that Incorrect configuration of fcgi on nginx causes the same error.

It’s in german, but it looks like it got easier (with apache2): https://dominicpratt.de/urbackup-ssl-aktivieren-unter-debian-stretch/ Will have to adjust the manual.

The old module should still work, but you probably have to compile it yourself or find a repository with an updated version of it.

Thank you Uroni. Before I posting here, I tested a solution from Dominic, unfortunately without success (of course it is possible that I made some mistakes).

Hello,

I realize this is really late but I thought I’d put this out there because it took me a while to figure this out. I just installed urbackup 2.1.19, lighttpd 1.4.45 on Centos 7.

I seemed to be having a similar issue with lighttpd and fastcgi where my screen would show the urbackup frame but then sit and spin. I noticed in the logs I was getting an HTTP 404 when the system tried to “POST /urbackup/x?a=login”. I added a line to fastcgi.conf:

fastcgi.server = (
“/urbackup/x” =>
(( “host” => “127.0.0.1”,
“port” => 55413, <- put a comma on the end of this line
“check-local” => “disable” <- add this line (no comma)
))
)

Once I restarted lighttpd I was able to get a login prompt and use SSL to get to the server. Instead of a HTTP 404 I now get a HTTP 200 OK :slight_smile:

Not sure if this will fix the issue with Apache but it did fix my issue with lighttpd. Thought I would share. Hopefully it will save someone some time.

John

1 Like

Hi,
I installed today urbackup on debian 10 and got the apache2 with ssl to work. I used the home:uroni project hier:

https://software.opensuse.org/download.html?project=home%3Auroni&package=urbackup-server

After installing apache2 all you need to do is to enable the ssl, proxy and the proxy_fcgi modules:

a2enmod ssl proxy proxy_fcgi

then disable the default vhost:

a2dissite 000-default.conf

create urbackup vhost:

vim /etc/apache2/sites-available/urbackup.conf

with the following content:

<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	ServerName urbackup.local.domain
	DocumentRoot /usr/share/urbackup/www/
	Redirect permanent / https://urbackup.local.domain/

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

<IfModule mod_ssl.c>
	<VirtualHost _default_:443>
		ServerAdmin webmaster@localhost
		ServerName urbackup.local.domain
		DocumentRoot /usr/share/urbackup/www/

		ServerSignature Off
		SSLProxyEngine On
		ProxyPreserveHost On
		ProxyPass "/x" "fcgi://localhost:55413"

		ErrorLog ${APACHE_LOG_DIR}/error.log
		CustomLog ${APACHE_LOG_DIR}/access.log combined

		SSLEngine on
		SSLCertificateFile	/etc/ssl/certs/mycert.crt
		SSLCertificateKeyFile /etc/ssl/private/mykey.key

		<FilesMatch "\.(cgi|shtml|phtml|php)$">
				SSLOptions +StdEnvVars
		</FilesMatch>
		<Directory /usr/lib/cgi-bin>
				SSLOptions +StdEnvVars
		</Directory>
	</VirtualHost>
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

You need to adjust the ServerName and the mycert.crt and mykey.key.
Last step is to enable you vhost and restart apache2:

a2ensite urbackup.conf
service apache2 restart

I hope this will help some one.

1 Like

Hi, thanks a ton for this!
I was going in circles trying to find the solution how to get ssl access via lighttpd working, i had the same issue where the page would load (progress bar at the top just seems to go on forever, looking like this:

Also found the error was "GET /x HTTP/2.0" 404 in the access.log for lighttpd (changed the document-root to /usr/share/urbackup/www).
Could not find a solution, and finally found your solution, which i can confirm works!
Again, thanks a lot!

By the way, adding “index.htm” as a valid index was needed too:
For completion and reference, these were the steps it took on vanilla Debian bookworm (from the top of my head):
generate/obtain (self-signed) certificate and private key, save in concatenated form in /etc/lighttpd/server.pem

apt install lighttpd lighttpd-mod-ssl
lighty-enable-mod ssl fastcgi

edit /etc/lighttpd/conf-enabled/10-fastcgi.conf and append:

fastcgi.server = (  
  "/x" =>  
  (( "host" => "127.0.0.1",  
     "port" => 55413,
	 "check-local" => "disable"
  ))  
) 

edit /etc/lighttpd/conf-enabled/10-ssl.conf and append/change (port 55416 is an example and notice the different documentroot):

$SERVER["socket"] == "0.0.0.0:55416" {
	ssl.engine  = "enable"
	server.follow-symlink = "enable"
	server.document-root = "/usr/share/urbackup/www"
	index-file.names += ( "index.htm" )
}
include_shell "/usr/share/lighttpd/use-ipv6.pl 55416"

finally perform a systemctl restart lighttpd.service, browse to https://your-urbackup-server-cn-or-san:55416 and enjoy :wink:
Hope this saves others some time too.