Add add.txt & disable unnecessary logging
This commit is contained in:
parent
a1708ef12b
commit
5106e34fb6
@ -4,5 +4,6 @@ add_header X-Robots-Tag "noindex, nofollow" always;
|
|||||||
location = /robots.txt {
|
location = /robots.txt {
|
||||||
root /srv/nginx;
|
root /srv/nginx;
|
||||||
allow all;
|
allow all;
|
||||||
|
log_not_found off;
|
||||||
access_log off;
|
access_log off;
|
||||||
}
|
}
|
@ -1,3 +1,16 @@
|
|||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
root /srv/nginx;
|
root /srv/nginx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location = /ads.txt {
|
||||||
|
root /srv/nginx;
|
||||||
|
allow all;
|
||||||
|
log_not_found off;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
location = /app-ads.txt {
|
||||||
|
root /srv/nginx;
|
||||||
|
allow all;
|
||||||
|
log_not_found off;
|
||||||
|
access_log off;
|
||||||
|
}
|
2
setup.sh
2
setup.sh
@ -66,6 +66,8 @@ fi
|
|||||||
# Setup webroot for NGINX
|
# Setup webroot for NGINX
|
||||||
## Explicitly using /var/srv here because SELinux does not follow symlinks
|
## Explicitly using /var/srv here because SELinux does not follow symlinks
|
||||||
sudo semanage fcontext -a -t httpd_sys_content_t "$(realpath /srv/nginx)(/.*)?"
|
sudo semanage fcontext -a -t httpd_sys_content_t "$(realpath /srv/nginx)(/.*)?"
|
||||||
|
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/srv/nginx/ads.txt | sudo tee /srv/nginx/ads.txt > /dev/null
|
||||||
|
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/srv/nginx/app-ads.txt | sudo tee /srv/nginx/app-ads.txt > /dev/null
|
||||||
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/srv/nginx/robots.txt | sudo tee /srv/nginx/robots.txt > /dev/null
|
unpriv curl -s https://raw.githubusercontent.com/GrapheneOS/infrastructure/main/srv/nginx/robots.txt | sudo tee /srv/nginx/robots.txt > /dev/null
|
||||||
sudo mkdir -p /srv/nginx/.well-known/acme-challenge
|
sudo mkdir -p /srv/nginx/.well-known/acme-challenge
|
||||||
sudo chmod -R 755 /srv/nginx/.well-known/acme-challenge
|
sudo chmod -R 755 /srv/nginx/.well-known/acme-challenge
|
||||||
|
1
srv/nginx/ads.txt
Normal file
1
srv/nginx/ads.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
placeholder.example.com, placeholder, DIRECT, placeholder
|
1
srv/nginx/app-ads.txt
Normal file
1
srv/nginx/app-ads.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
placeholder.example.com, placeholder, DIRECT, placeholder
|
Loading…
x
Reference in New Issue
Block a user