Skip to content

Commit

Permalink
Add add.txt & disable unnecessary logging
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyTran732 authored Oct 13, 2024
1 parent a1708ef commit 5106e34
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions etc/nginx/snippets/robots.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ add_header X-Robots-Tag "noindex, nofollow" always;
location = /robots.txt {
root /srv/nginx;
allow all;
log_not_found off;
access_log off;
}
13 changes: 13 additions & 0 deletions etc/nginx/snippets/universal_paths.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
location /.well-known/acme-challenge/ {
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 changes: 2 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ fi
# Setup webroot for NGINX
## Explicitly using /var/srv here because SELinux does not follow symlinks
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
sudo mkdir -p /srv/nginx/.well-known/acme-challenge
sudo chmod -R 755 /srv/nginx/.well-known/acme-challenge
Expand Down
1 change: 1 addition & 0 deletions srv/nginx/ads.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder.example.com, placeholder, DIRECT, placeholder
1 change: 1 addition & 0 deletions srv/nginx/app-ads.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder.example.com, placeholder, DIRECT, placeholder

0 comments on commit 5106e34

Please sign in to comment.