Skip to content

Instantly share code, notes, and snippets.

@frknbasaran
Last active February 28, 2023 15:13
Show Gist options
  • Save frknbasaran/9afaeaaa161324b3027b7ff3e1186e2d to your computer and use it in GitHub Desktop.
Save frknbasaran/9afaeaaa161324b3027b7ff3e1186e2d to your computer and use it in GitHub Desktop.
Nginx conf file for registry.usemevo.com
server {
listen 80;
listen [::]:80;
root /var/www/registry.usemevo.com/html;
index index.html index.htm index.nginx-debian.html;
server_name registry.usemevo.com;
location / {
# Do not allow connections from docker 1.5 and earlier
# docker pre-1.6.0 did not properly set the user agent on ping, catch "Go *" user agents
if ($http_user_agent ~ "^(docker\/1\.(3|4|5(?!\.[0-9]-dev))|Go ).*$" ) {
return 404;
}
proxy_pass http://127.0.0.1:5000;
proxy_set_header Host $http_host; # required for docker client's sake
proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 900;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment