Skip to content

Instantly share code, notes, and snippets.

@jeremyfelt
jeremyfelt / proxy-production.conf
Last active May 14, 2019 18:02
Nginx configuration to proxy 404 files locally to a production domain
# Adjust this to include any other necessary files.
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 24h;
log_not_found off;
try_files $uri $uri/ @production;
}
location @production {
resolver 1.1.1.1;
proxy_pass http://{replace-with.domain.com}/$uri;