centos_nginx_backuppc4.x
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| centos_nginx_backuppc4.x [2018/02/15 17:58] – [Required Third party scripts] k2patel | centos_nginx_backuppc4.x [2020/08/10 02:35] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== CentOS / Fedora + Nginx + Backuppc ====== | + | ====== CentOS |
| This combination gave me no documentation online, Recently Backuppc is available as SCGI Script version.\\ | This combination gave me no documentation online, Recently Backuppc is available as SCGI Script version.\\ | ||
| Line 23: | Line 23: | ||
| ==== Configuration ==== | ==== Configuration ==== | ||
| - | In configuration i've only changed few of the options to make it work under browser. | + | === In configuration i've only changed few of the options to make it work under browser. |
| <code diff| / | <code diff| / | ||
| Line 113: | Line 114: | ||
| # | # | ||
| # CSS stylesheet " | # CSS stylesheet " | ||
| + | </ | ||
| + | |||
| + | === Nginx Configuration === | ||
| + | <code bash | / | ||
| + | worker_processes | ||
| + | |||
| + | events { | ||
| + | worker_connections | ||
| + | } | ||
| + | |||
| + | http { | ||
| + | include | ||
| + | default_type | ||
| + | |||
| + | sendfile | ||
| + | |||
| + | keepalive_timeout | ||
| + | |||
| + | gzip on; | ||
| + | |||
| + | server { | ||
| + | listen | ||
| + | server_name | ||
| + | |||
| + | return 302 https:// | ||
| + | |||
| + | } | ||
| + | |||
| + | server { | ||
| + | listen | ||
| + | server_name | ||
| + | |||
| + | ssl on; | ||
| + | ssl_certificate | ||
| + | ssl_certificate_key | ||
| + | ssl_trusted_certificate / | ||
| + | |||
| + | # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months) | ||
| + | add_header Strict-Transport-Security max-age=63072000; | ||
| + | |||
| + | # OCSP Stapling --- | ||
| + | # fetch OCSP records from URL in ssl_certificate and cache them | ||
| + | ssl_stapling on; | ||
| + | ssl_stapling_verify off; | ||
| + | # modern configuration. tweak to your needs. | ||
| + | ssl_protocols TLSv1.2; | ||
| + | ssl_ciphers ' | ||
| + | ssl_prefer_server_ciphers on; | ||
| + | |||
| + | ssl_session_timeout 1d; | ||
| + | ssl_session_cache shared: | ||
| + | ssl_session_tickets off; | ||
| + | |||
| + | add_header Strict-Transport-Security max-age=63072000; | ||
| + | add_header X-Frame-Options DENY; | ||
| + | add_header X-Content-Type-Options nosniff; | ||
| + | |||
| + | error_page | ||
| + | location = /50x.html { | ||
| + | root / | ||
| + | } | ||
| + | |||
| + | access_log | ||
| + | error_log | ||
| + | |||
| + | location / { | ||
| + | auth_basic " | ||
| + | auth_basic_user_file / | ||
| + | root / | ||
| + | return 302 http:// | ||
| + | index BackupPC.html; | ||
| + | } | ||
| + | |||
| + | location /BackupPC { | ||
| + | alias / | ||
| + | index BackupPC.html; | ||
| + | } | ||
| + | |||
| + | #location ~\.cgi$ { | ||
| + | location ~ ^/ | ||
| + | auth_basic " | ||
| + | auth_basic_user_file / | ||
| + | gzip off; | ||
| + | include / | ||
| + | fastcgi_pass localhost: | ||
| + | |||
| + | fastcgi_param REMOTE_ADDR | ||
| + | fastcgi_param REMOTE_USER | ||
| + | fastcgi_param SCRIPT_FILENAME / | ||
| + | } | ||
| + | |||
| + | location ~ /\.ht { | ||
| + | deny all; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| </ | </ | ||
| ==== Required Third party scripts ==== | ==== Required Third party scripts ==== | ||
| - | <code perl | fcgi wrapper | + | <code perl | / |
| # | # | ||
| Line 217: | Line 314: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | === Systemd Script === | ||
| + | <code bash | / | ||
| + | [Unit] | ||
| + | Description=Fast CGI wrapper | ||
| + | After=network.target | ||
| + | |||
| + | [Service] | ||
| + | Type=forking | ||
| + | TimeoutStopSec=0 | ||
| + | User=backuppc | ||
| + | Group=backuppc | ||
| + | ExecStart=/ | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | </ | ||
| + | |||
| + | ==== Final Note ==== | ||
| + | Once everything is configured you should be able to access your backuppc using user admin.\\ | ||
| + | |||
| + | |||
centos_nginx_backuppc4.x.1518717480.txt.gz · Last modified: 2020/08/10 02:28 (external edit)
