robots.txt added

This fixes the randomly appearing 404 error in Auth  (issue #1232)
This commit is contained in:
Peter Pfeufer 2021-04-15 20:59:25 +02:00
parent 630400fee4
commit 8f59f2549a
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27
3 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,2 @@
User-agent: *
Disallow: /

View File

@ -45,17 +45,25 @@ Place your virtual host configuration in the appropriate section within `/etc/ht
```
<VirtualHost *:80>
ServerName auth.example.com
ProxyPassMatch ^/static !
ProxyPassMatch ^/robots.txt !
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
ProxyPreserveHost On
Alias "/static" "/var/www/myauth/static"
Alias "/robots.txt" "/var/www/myauth/static/robots.txt"
<Directory "/var/www/myauth/static">
Require all granted
</Directory>
<Location "/robots.txt">
SetHandler None
Require all granted
</Location>
</VirtualHost>
```

View File

@ -69,6 +69,10 @@ server {
autoindex off;
}
location /robots.txt {
alias /var/www/myauth/static/robots.txt;
}
# Gunicorn config goes below
location / {
include proxy_params;