Add add.txt & disable unnecessary logging
This commit is contained in:
		@@ -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;
 | 
			
		||||
}
 | 
			
		||||
@@ -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
									
								
								setup.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.sh
									
									
									
									
									
								
							@@ -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
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										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
 | 
			
		||||
		Reference in New Issue
	
	Block a user