Skip to content

Instantly share code, notes, and snippets.

@wohugb
Last active December 19, 2022 04:28
Show Gist options
  • Save wohugb/be3d7e551cfe3d4827886cdf1a6cdb23 to your computer and use it in GitHub Desktop.
Save wohugb/be3d7e551cfe3d4827886cdf1a6cdb23 to your computer and use it in GitHub Desktop.
本地域名端口绑定
# /etc/hosts
127.0.0.1 example.com
# /etc/nginx/conf.d/example.conf
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://127.0.0.1:9191/;
}
}
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
chrome://net-internals/#dns
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment