Update README with Apache example

This commit is contained in:
Josh Holtrop 2026-03-28 15:38:13 -04:00
parent 7f0cf36419
commit f31e97b014

View File

@ -8,7 +8,52 @@ Copy repository directory to `/var/www/malp`.
### Example Apache Setup ### Example Apache Setup
Here is my example setup.
My server's name is `anubis`.
Replace as desired.
``` ```
mkdir /etc/httpd/tls mkdir /etc/httpd/tls
openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp384r1) -keyout /etc/httpd/tls/anubis.key -out /etc/httpd/tls/anubis.crt -days 3650 -sha384 cd /etc/httpd/tls
openssl ecparam -name secp384r1 -genkey -noout -out anubis.key
openssl req -new -x509 -key anubis.key -out anubis.crt -days 3650 -sha384
```
#### /etc/httpd/conf.d/anubis.conf
```
<VirtualHost *:80>
ServerName anubis
ServerAlias anubis
# Permanent redirect to the same URI on HTTPS
Redirect permanent / https://anubis/
</VirtualHost>
<VirtualHost *:443>
ServerName anubis
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/httpd/tls/anubis.crt
SSLCertificateKeyFile /etc/httpd/tls/anubis.key
# Modern TLS Security (Recommended for ECDSA)
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
SSLHonorCipherOrder off
SSLSessionTickets off
ErrorLog /var/log/httpd/anubis-error.log
CustomLog /var/log/httpd/anubis-access.log combined
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ScriptAlias / /var/www/malp/cgi-bin/malp.rb
</VirtualHost>
``` ```