Update nginx.conf for signet, services, and disable SSR for now
This commit is contained in:
		
							parent
							
								
									279cba5d79
								
							
						
					
					
						commit
						7195d6ea31
					
				| @ -33,6 +33,9 @@ | |||||||
| 
 | 
 | ||||||
| 		# fallback for all URLs i.e. /address/foo /tx/foo /block/000 | 		# fallback for all URLs i.e. /address/foo /tx/foo /block/000 | ||||||
| 		location / { | 		location / { | ||||||
|  | #			if ($http_user_agent ~* "(Google|Bing|Yandex|Slack|Keybase|Twitter)") { | ||||||
|  | #				proxy_pass https://node202.mempool.space; | ||||||
|  | #			} | ||||||
| 			try_files /$lang/$uri /$lang/$uri/ $uri $uri/ /en-US/$uri @index-redirect; | 			try_files /$lang/$uri /$lang/$uri/ $uri $uri/ /en-US/$uri @index-redirect; | ||||||
| 		} | 		} | ||||||
| 		location @index-redirect { | 		location @index-redirect { | ||||||
| @ -57,7 +60,7 @@ | |||||||
| 		} | 		} | ||||||
| 		# old /explorer redirect from v1 days | 		# old /explorer redirect from v1 days | ||||||
| 		location /explorer { | 		location /explorer { | ||||||
| 			rewrite /explorer/(.*) https://$host/$1 permanent; | 			try_files $uri =410; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| 		# static API docs | 		# static API docs | ||||||
| @ -93,14 +96,22 @@ | |||||||
| 			#return 302 https://mempool.space/$request_uri; | 			#return 302 https://mempool.space/$request_uri; | ||||||
| 			try_files $uri $uri/ /en-US/index.html =404; | 			try_files $uri $uri/ /en-US/index.html =404; | ||||||
| 		} | 		} | ||||||
|  | 		location = /signet/api { | ||||||
|  | 			#return 302 https://mempool.space/$request_uri; | ||||||
|  | 			try_files $uri $uri/ /en-US/index.html =404; | ||||||
|  | 		} | ||||||
|  | 		location = /signet/api/ { | ||||||
|  | 			#return 302 https://mempool.space/$request_uri; | ||||||
|  | 			try_files $uri $uri/ /en-US/index.html =404; | ||||||
|  | 		} | ||||||
| 
 | 
 | ||||||
| 		# mainnet API | 		# mainnet API | ||||||
| 		location /api/v1/donations { | 		location /api/v1/donations { | ||||||
| 			proxy_pass http://127.0.0.1:8999; | 			proxy_pass http://127.0.0.1:9001; | ||||||
| 			# don't rate limit this API prefix | 			# don't rate limit this API prefix | ||||||
| 		} | 		} | ||||||
| 		location /api/v1/donations/images { | 		location /api/v1/donations/images { | ||||||
| 			proxy_pass http://127.0.0.1:8999; | 			proxy_pass http://127.0.0.1:9001; | ||||||
| 			proxy_cache cache; | 			proxy_cache cache; | ||||||
| 			proxy_cache_valid 200 1d; | 			proxy_cache_valid 200 1d; | ||||||
| 		} | 		} | ||||||
| @ -115,7 +126,7 @@ | |||||||
| 			limit_req burst=50 nodelay zone=api; | 			limit_req burst=50 nodelay zone=api; | ||||||
| 		} | 		} | ||||||
| 		location /api/ { | 		location /api/ { | ||||||
| 			proxy_pass http://[::1]:3000/; | 			proxy_pass http://electrs-mainnet/; | ||||||
| 			limit_req burst=50 nodelay zone=electrs; | 			limit_req burst=50 nodelay zone=electrs; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| @ -131,7 +142,7 @@ | |||||||
| 			limit_req burst=50 nodelay zone=api; | 			limit_req burst=50 nodelay zone=api; | ||||||
| 		} | 		} | ||||||
| 		location /liquid/api/ { | 		location /liquid/api/ { | ||||||
| 			proxy_pass http://[::1]:3001/; | 			proxy_pass http://electrs-liquid/; | ||||||
| 			limit_req burst=50 nodelay zone=electrs; | 			limit_req burst=50 nodelay zone=electrs; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| @ -147,7 +158,7 @@ | |||||||
| 			limit_req burst=50 nodelay zone=api; | 			limit_req burst=50 nodelay zone=api; | ||||||
| 		} | 		} | ||||||
| 		location /testnet/api/ { | 		location /testnet/api/ { | ||||||
| 			proxy_pass http://[::1]:3002/; | 			proxy_pass http://electrs-testnet/; | ||||||
| 			limit_req burst=50 nodelay zone=electrs; | 			limit_req burst=50 nodelay zone=electrs; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
| @ -171,6 +182,22 @@ | |||||||
| 			limit_req burst=50 nodelay zone=api; | 			limit_req burst=50 nodelay zone=api; | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  | 		# signet API | ||||||
|  | 		location /signet/api/v1/ws { | ||||||
|  | 			proxy_pass http://127.0.0.1:8995/; | ||||||
|  | 			proxy_http_version 1.1; | ||||||
|  | 			proxy_set_header Upgrade $http_upgrade; | ||||||
|  | 			proxy_set_header Connection "Upgrade"; | ||||||
|  | 		} | ||||||
|  | 		location /signet/api/v1 { | ||||||
|  | 			proxy_pass http://127.0.0.1:8995/api/v1; | ||||||
|  | 			limit_req burst=50 nodelay zone=api; | ||||||
|  | 		} | ||||||
|  | 		location /signet/api/ { | ||||||
|  | 			proxy_pass http://electrs-signet/; | ||||||
|  | 			limit_req burst=50 nodelay zone=electrs; | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		# mainnet API | 		# mainnet API | ||||||
| 		location /ws { | 		location /ws { | ||||||
| 			proxy_pass http://127.0.0.1:8999/; | 			proxy_pass http://127.0.0.1:8999/; | ||||||
|  | |||||||
| @ -167,6 +167,17 @@ http { | |||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	upstream electrs-signet { | ||||||
|  | 		server [2401:b140:1::100:220]:3003; | ||||||
|  | 	} | ||||||
|  | 	server { | ||||||
|  | 		listen 127.0.0.1:2003; | ||||||
|  | 		access_log /dev/null; | ||||||
|  | 		location / { | ||||||
|  | 			proxy_pass http://electrs-signet; | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	server { | 	server { | ||||||
| 		listen 80; | 		listen 80; | ||||||
| 		server_name mempool.space mempool.ninja node100.bitcoin.wiz.biz; | 		server_name mempool.space mempool.ninja node100.bitcoin.wiz.biz; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user