Last active
March 30, 2025 11:57
-
-
Save finalwebsites/7f63dabaecab9ad247cdbaf0c67d9b4a to your computer and use it in GitHub Desktop.
NGINX server configuration for the UrBackup web interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the example host configuration for NGINX for a UrBackup server.
Check here the tutorial Secure the UrBackup web interface.