server { listen 8080 default_server; server_name lib.routersys.com; server_tokens off; root /usr/share/nginx/html; index index.html; absolute_redirect off; gzip off; default_type application/octet-stream; add_header Cache-Control "public, max-age=600, no-transform" always; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; if ($request_method !~ ^(GET|HEAD)$) { return 405 "Method Not Allowed\n"; } location ~ \.mjs$ { default_type text/javascript; try_files $uri =404; } location = /robots.txt { default_type text/plain; return 200 "User-agent: *\nAllow: /\n\nSitemap: https://lib.routersys.com/WorldNet/sitemap.xml\nSitemap: https://lib.routersys.com/R128Net/sitemap.xml\nSitemap: https://lib.routersys.com/EllipseForeground/sitemap.xml\n"; } location = / { return 302 /WorldNet/; } location = /WorldNet { return 301 /WorldNet/; } location = /R128Net { return 301 /R128Net/; } location = /EllipseForeground { return 301 /EllipseForeground/; } location /WorldNet/ { error_page 404 /WorldNet/404.html; try_files $uri $uri/ =404; } location /R128Net/ { error_page 404 /R128Net/404.html; try_files $uri $uri/ =404; } location /EllipseForeground/ { error_page 404 /EllipseForeground/404.html; try_files $uri $uri/ =404; } location / { default_type text/plain; return 404 "Not Found\n"; } }