User Tools

Site Tools


setup-config-debian-bullseye

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
setup-config-debian-bullseye [2022/07/21 20:23] adminsetup-config-debian-bullseye [2022/07/24 16:18] (current) admin
Line 47: Line 47:
 #or symlink into /etc/apache2/sites-enabled #or symlink into /etc/apache2/sites-enabled
 </code> </code>
 +
 +=== Apache authentication htpasswd ===
 +Within a vhost, add:
 +<code>
 +        <Location />
 +                Order Allow,Deny
 +                Allow from all
 +                AuthName "Secure"
 +                AuthType Basic
 +                AuthUserFile /etc/apache2/secure/htpasswd
 +                require valid-user
 +                Allow from 127.0.0.1
 +        </Location>
 +</code>
 +To create a htpasswd file:
 +<code>
 +htpasswd -c /etc/apache2/htpasswd username
 +</code>
 +
 +=== Apache HTTPS Secure ssl ===
 +Self Signed Cert
 +<code>
 +make-ssl-cert generate-default-snakeoil
 +
 +<VirtualHost *:443>
 +
 +        ServerAdmin webmaster@localhost
 +        DocumentRoot /var/www/html
 +
 +        ErrorLog ${APACHE_LOG_DIR}/error.log
 +        CustomLog ${APACHE_LOG_DIR}/access.log combined
 +
 + SSLEngine on
 +                SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
 +                SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
 +                <FilesMatch "\.(cgi|shtml|phtml|php)$">
 +                                SSLOptions +StdEnvVars
 +                </FilesMatch>
 +                <Directory /usr/lib/cgi-bin>
 +                                SSLOptions +StdEnvVars
 +                </Directory>
 +</VirtualHost>
 +</code>
 +Ref: /etc/apache2/sites-available/default-ssl.conf
  
 ===== MySQL migrations ===== ===== MySQL migrations =====
Line 67: Line 111:
 apt-get install fail2ban apt-get install fail2ban
 apt-get install links apt-get install links
 +</code>
 +==== chkrootkit ====
 +<code>
 +apt-get install chkrootkit
 +vi /etc/chkrootkit.conf
 +#change to:
 +RUN_DAILY="true"
 +RUN_DAILY_OPTS="-q"
 +DIFF_MODE="true"
 +
 +vi /etc/aliases
 +#add
 +root:           localuser
 +
 +#then run the following to take effect:
 +newaliases
 +
 +Now the user will get nightly emails with chkrootkit report.
 +
 +</code>
 +
 +
 </code> </code>
  
setup-config-debian-bullseye.1658431422.txt.gz · Last modified: 2022/07/21 20:23 by admin