Skip to content

Instantly share code, notes, and snippets.

@ejcx
Last active December 9, 2022 21:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ejcx/0cb7083361d9503211dc9aa8616edf0e to your computer and use it in GitHub Desktop.
Save ejcx/0cb7083361d9503211dc9aa8616edf0e to your computer and use it in GitHub Desktop.
Basic configuration for a global HTTP proxy.
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
log_format main '[$time_local] $scheme://$host$request_uri $status $http_user_agent';
server {
listen 80;
server_name localhost;
access_log /tmp/proxy.access.log main;
location ~ / {
resolver 8.8.8.8;
set $origin_server "$scheme://$host";
proxy_pass $origin_server;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment