User Tools

Site Tools


freebsd_nginx_backuppc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
freebsd_nginx_backuppc [2017/07/11 16:45]
k2patel [NGINX]
freebsd_nginx_backuppc [2020/08/10 02:35] (current)
Line 4: Line 4:
 Not going to discuss on setting up jail etc., this topic mainly focused on quick installation once your JAIL is setup. Not going to discuss on setting up jail etc., this topic mainly focused on quick installation once your JAIL is setup.
  
 +Note: For Linux RHEL Based installation look ([[https://​wiki.k2patel.in/​doku.php?​id=centos_nginx_backuppc4.x | here ]])
 ===== Installation ===== ===== Installation =====
 Installing packages required.\\ Installing packages required.\\
Line 29: Line 30:
 </​code>​ </​code>​
  
 +Configure backuppc for first time
 +<code bash>
 +/​usr/​local/​etc/​backuppc/​update.sh
 +</​code>​
 ==== FCGI ==== ==== FCGI ====
 Running Nginx going to use fcgiwrap package instead of CGI. Running Nginx going to use fcgiwrap package instead of CGI.
Line 80: Line 85:
         ssl_certificate ​     /​usr/​local/​etc/​nginx/​ssl/<​domain>​.crt;​         ssl_certificate ​     /​usr/​local/​etc/​nginx/​ssl/<​domain>​.crt;​
         ssl_certificate_key ​ /​usr/​local/​etc/​nginx/​ssl/<​domain>​.key;​         ssl_certificate_key ​ /​usr/​local/​etc/​nginx/​ssl/<​domain>​.key;​
-        ssl_trusted_certificate /​usr/​local/​etc/​nginx/​ssl/<​domain>​.ca;​+        ssl_trusted_certificate /​usr/​local/​etc/​nginx/​ssl/<​domain>​.int.ca;
  
         # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)         # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
Line 144: Line 149:
 </​code>​ </​code>​
 </​WRAP>​ </​WRAP>​
 +
 +===== Outgoing Mail =====
 +In order to send notice and mail from backuppc i configured sendonly mail '​ssmtp'​.\\
 +
 +**installation:​**
 +<code bash>
 +pkg install ssmtp
 +</​code>​
 +
 +**Configuration:​**
 +This is simple but few points to remember:
 +  - It does not use /​etc/​aliases
 +  - change your mail configuration
 +  - You have to configure your aliases in `/​usr/​local/​etc/​ssmtp/​revaliases`
 +  - mail command does not read these aliases
 +
 +<code bash /​usr/​local/​etc/​ssmtp/​revaliases (optional)>​
 +# Alias look like this
 +root:​k2patel@hotmail.com:​smtp.k2patel.in
 +</​code>​
 +
 +<code bash /​usr/​local/​etc/​ssmtp/​ssmtp.conf>​
 +# This is simplified version of my configuraiton
 +root=k2patel@hotmail.com
 +mailhub=smtp.k2patel.in
 +rewriteDomain=backup.k2patel.in
 +hostname=_HOSTNAME_
 +</​code>​
 +
 +<code bash /​etc/​mail/​mailer.conf>​
 +# this is what my mailer.conf file looks like
 +sendmail /​usr/​local/​sbin/​ssmtp
 +send-mail /​usr/​local/​sbin/​ssmtp
 +mailq /​usr/​local/​sbin/​ssmtp
 +newaliases /​usr/​local/​sbin/​ssmtp
 +hoststat /​usr/​bin/​true
 +purgestat /​usr/​bin/​true
 +</​code>​
 +
 +<code bash /​etc/​mail.rc>​
 +# this change does not require, unless you want to send email using mail command and want aliases to work
 +set append dot save ask crt
 +ignore Received Message-Id Resent-Message-Id Status Mail-From Return-Path Via
 +alias root backup@k2patel.in
 +</​code>​
 +===== Troubleshooting =====
 +  - If there is any issue related to fcgiwrap
 +      - Check permission of '/​var/​run/​fcgiwrap/​fcgiwrap.socket',​ it should be owned by '​www'​.
 +  - Creating user for nginx '/​usr/​local/​etc/​nginx/​backuppc.users'​
 +      - openssl passwd -apr1
  
freebsd_nginx_backuppc.1499791536.txt.gz ยท Last modified: 2020/08/10 02:30 (external edit)