mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-13 22:40:16 +02:00
Merge branch 'add-robots-txt' into 'v2.9.x'
Adding robots.txt to fix random 404 message See merge request allianceauth/allianceauth!1302
This commit is contained in:
commit
d173a59441
2
allianceauth/static/robots.txt
Normal file
2
allianceauth/static/robots.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
User-agent: *
|
||||||
|
Disallow: /
|
@ -45,17 +45,25 @@ Place your virtual host configuration in the appropriate section within `/etc/ht
|
|||||||
```
|
```
|
||||||
<VirtualHost *:80>
|
<VirtualHost *:80>
|
||||||
ServerName auth.example.com
|
ServerName auth.example.com
|
||||||
|
|
||||||
ProxyPassMatch ^/static !
|
ProxyPassMatch ^/static !
|
||||||
|
ProxyPassMatch ^/robots.txt !
|
||||||
|
|
||||||
ProxyPass / http://127.0.0.1:8000/
|
ProxyPass / http://127.0.0.1:8000/
|
||||||
ProxyPassReverse / http://127.0.0.1:8000/
|
ProxyPassReverse / http://127.0.0.1:8000/
|
||||||
ProxyPreserveHost On
|
ProxyPreserveHost On
|
||||||
|
|
||||||
Alias "/static" "/var/www/myauth/static"
|
Alias "/static" "/var/www/myauth/static"
|
||||||
|
Alias "/robots.txt" "/var/www/myauth/static/robots.txt"
|
||||||
|
|
||||||
<Directory "/var/www/myauth/static">
|
<Directory "/var/www/myauth/static">
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
<Location "/robots.txt">
|
||||||
|
SetHandler None
|
||||||
|
Require all granted
|
||||||
|
</Location>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -69,6 +69,10 @@ server {
|
|||||||
autoindex off;
|
autoindex off;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /robots.txt {
|
||||||
|
alias /var/www/myauth/static/robots.txt;
|
||||||
|
}
|
||||||
|
|
||||||
# Gunicorn config goes below
|
# Gunicorn config goes below
|
||||||
location / {
|
location / {
|
||||||
include proxy_params;
|
include proxy_params;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user