Skip to content

Instantly share code, notes, and snippets.

@Keithwachira
Created July 2, 2019 09:34
Show Gist options
  • Save Keithwachira/6645df513afcb23b042aa7b87487c204 to your computer and use it in GitHub Desktop.
Save Keithwachira/6645df513afcb23b042aa7b87487c204 to your computer and use it in GitHub Desktop.
setunp nginx to serve images
server{
listen 80 default_server;
server_name example.com www.example.com
server_name dev ipv6only=on;
root /path/to/your/image/folder;
location / images {
}
location / {
proxy_pass http://localhost:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment