Files
system-config/playbooks/roles/static/files/50-docs.airshipit.org.conf
Clark Boylan 25b08c09a8 Apply UserAgentFilter to every vhost on static
AI crawlers continue to get more and more aggressive. To ensure that
there are more webserver slots for actual users apply the user agent
filter to every vhost on static.o.o.

Note that at least one vhost already used the ua filter so we don't need
to update config management beyond the vhost configs. The macro is
already installed on static.

Change-Id: I7c377d51f0a89272fd6fadbecc3d7923bba3cfd7
2025-07-22 10:02:55 -07:00

44 lines
1.4 KiB
Plaintext
Executable File

Define AFS_ROOT /afs/openstack.org/project/airshipit.org
<VirtualHost *:80>
ServerName docs.airshipit.org
RewriteEngine On
Use UserAgentFilter
RewriteRule ^/(.*) https://docs.airshipit.org/$1 [last,redirect=permanent]
LogLevel warn
ErrorLog /var/log/apache2/docs.airshipit.org_error.log
CustomLog /var/log/apache2/docs.airshipit.org_access.log combined
ServerSignature Off
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName docs.airshipit.org
DocumentRoot ${AFS_ROOT}/docs
Use UserAgentFilter
SSLCertificateFile /etc/letsencrypt-certs/docs.airshipit.org/docs.airshipit.org.cer
SSLCertificateKeyFile /etc/letsencrypt-certs/docs.airshipit.org/docs.airshipit.org.key
SSLCertificateChainFile /etc/letsencrypt-certs/docs.airshipit.org/ca.cer
SSLProtocol All -SSLv2 -SSLv3
# Note: this list should ensure ciphers that provide forward secrecy
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:!AES256:!aNULL:!eNULL:!MD5:!DSS:!PSK:!SRP
SSLHonorCipherOrder on
<Directory ${AFS_ROOT}/docs>
Options Indexes FollowSymLinks MultiViews
AllowOverrideList Redirect RedirectMatch
Require all granted
</Directory>
LogLevel warn
ErrorLog /var/log/apache2/docs.airshipit.org_error.log
CustomLog /var/log/apache2/docs.airshipit.org_access.log combined
ServerSignature Off
</VirtualHost>
</IfModule>