Skip to content

Instantly share code, notes, and snippets.

ngohuunam / nginx.conf
Created Aug 13, 2021 — forked from Stanback/nginx.conf
Example Nginx configuration for serving pre-rendered HTML from Javascript pages/apps using the Prerender Service ( of using try_files (which can cause unnecessary overhead on busy servers), you could check $uri for specific file extensions and set $prerender appropriately.
View nginx.conf
# Note (November 2016):
# This config is rather outdated and left here for historical reasons, please refer to for the latest setup information
# Serving static html to Googlebot is now considered bad practice as you should be using the escaped fragment crawling protocol
server {
listen 80;
listen [::]:80;
root /path/to/your/htdocs;