A nginx which can generate config file from etcd
1.2K
etcdctl set /nginx-config/${PROJECT_NAME}-certificate/web02.example.com/pem < /home/web02.example.com/full_chain.pem
etcdctl set /nginx-config/${PROJECT_NAME}-certificate/web02.example.com/key < /home/web02.example.com/private.key
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/client_max_body_size 500m
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/root/location /
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/root/properties/deny all
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/root/properties/root /usr/share/nginx/html
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/root/properties/index index.html
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/ssl on
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/ssl_certificate /web02.example.com.pem
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/ssl_certificate_key /web02.example.com.key
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/location /share
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/properties/proxy_pass http://web02
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/properties/proxy_redirect off
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/properties/proxy_request_buffering off
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/properties/proxy_send_timeout 300
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/properties/proxy_read_timeout 300
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/properties/keepalive_timeout 300
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/properties/send_timeout 300
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/proxy_set_header/Host '$host'
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/proxy_set_header/X-Real-IP '$remote_addr'
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/proxy_set_header/X-Forwarded-For '$proxy_add_x_forwarded_for'
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/proxy_set_header/X-Forwarded-Proto '$scheme'
etcdctl set /nginx-config/${PROJECT_NAME}/web02.example.com:443/1/proxy_set_header/X-Forwarded-Host '$http_host' #Add environment variable
ETCD_CLIENT_IP (ETCD node IP}
PROJECT_NAME
Content type
Image
Digest
Size
60.3 MB
Last updated
over 8 years ago
docker pull openfrontier/nginx-etcd