Skip to content

Instantly share code, notes, and snippets.

@finalwebsites
Last active March 30, 2025 11:57
Show Gist options
  • Save finalwebsites/7f63dabaecab9ad247cdbaf0c67d9b4a to your computer and use it in GitHub Desktop.
Save finalwebsites/7f63dabaecab9ad247cdbaf0c67d9b4a to your computer and use it in GitHub Desktop.
NGINX server configuration for the UrBackup web interface
# Redirect all http traffic to https
server {
listen 80;
listen [::]:80;
#Replace with your host or domain name
server_name YOURHOSTNAME;
return 301 https://$host$request_uri;
}
server {
# place below your own IP address and enter more allow rules if needed
allow xxx.xxx.xx.xxx;
deny all;
listen 443 ssl http2;
listen [::]:443 ssl http2;
# Replace below YOURHOSTNAME with your host or domain name
server_name YOURHOSTNAME;
ssl_certificate /etc/letsencrypt/live/YOURHOSTNAME/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/YOURHOSTNAME/privkey.pem;
root /usr/share/urbackup/www/;
index index.htm;
location /x {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:55413;
}
}
@finalwebsites
Copy link
Author

finalwebsites commented Mar 30, 2025

This is the example host configuration for NGINX for a UrBackup server.
Check here the tutorial Secure the UrBackup web interface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment