server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /home/ubuntu; index index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location ~ ^/testnet/config.js?$ { try_files $uri $uri/ =404; } location ~ ^/b/(?.+)$ { rewrite ^ /index.html last; } location ~ ^/s/(?.+)$ { rewrite ^ /index.html last; } location ~ ^/screen?$ { rewrite ^ /index.html last; } location ~ ^/tutorial-address/?$ { rewrite ^ /index.html last; } location / { try_files $uri $uri/ =404; } location ~ ^/t/config.js?$ { rewrite ^ /testnet/config.js last; } location ~ ^/t/s/(?.+)$ { rewrite ^ /testnet/index.html last; } location ~ ^/t/b/(?.+)$ { rewrite ^ /testnet/index.html last; } location ~ ^/t/screen/?$ { rewrite ^ /testnet/index.html last; } location ~ ^/t/?$ { rewrite ^ /testnet/index.html last; } }