- brew install dnsmasq
- brew install nginx
# /usr/local/etc/dnsmasq.conf
no-dhcp-interface=
server=8.8.8.8
addn-hosts=/usr/local/etc/dnsmasq.hosts
# /usr/local/etc/dnsmasq.hosts
10.181.1.114 athena.huaxing.com
/usr/local/etc/nginx/certs/
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/nginx/certs/athena.huaxing.com.key -out /usr/local/etc/nginx/certs/athena.huaxing.com.crt
(FQDN: athena.huaxing.com)
/usr/local/etc/nginx/nginx.conf
server {
listen 80 default;
listen 443 ssl;
server_name athena.huaxing.com;
ssl_certificate /usr/local/etc/nginx/certs/athena.huaxing.com.crt;
ssl_certificate_key /usr/local/etc/nginx/certs/athena.huaxing.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://127.0.0.1:2000;
}
}
dig athena.huaxing.com @127.0.0.1
-> 10.181.1.114