upstream {{ pj | replace("_","") }} { {% for each_host in deploy_host.split(',') %} server {{ each_host }}:{{ port }}; {% endfor %} } server { listen 80; listen 443 ssl; server_name {{ domain }}; client_max_body_size 50M; access_log /data/logs/web/{{ domain }}.access.log json; error_log /data/logs/web/{{ domain }}.error.log; underscores_in_headers on; index index.php index.html index.htm default.php default.htm default.html; include enable-ssl.conf; location / { proxy_pass http://{{ pj | replace("_","") }}; } }