.   ,   nginx   ,  192.168.1.200 ( Ś<a href="http://mail.site.com">mail.site.com</a>).    -  ?<div><div>       /etc/nginx/mail.conf ( . ),        443      nginx.conf (    http     ,  ɚlocation),  ӣ  ,proxy_pass ,    .</div>
<div><br></div><div>http {</div><div> include    /etc/nginx/mime.types;</div><div> default_type application/octet-stream;</div><div> log_format main &#39;$remote_addr - $remote_user [$time_local] &quot;$request&quot; &#39;</div>
<div>          &#39;$status $body_bytes_sent &quot;$http_referer&quot; &#39;</div><div>          &#39;&quot;$http_user_agent&quot; &quot;$http_x_forwarded_for&quot;&#39;;</div><div> access_log /var/log/nginx/mail.access.log main;</div>
<div> sendfile    on;</div><div> keepalive_timeout 65;</div><div> proxy_set_header  X-Real-IP    $remote_addr;  </div><div> proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;</div><div>
 server {</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>listen    2345;</div><div>   server_name <a href="http://mail.site.com">mail.site.com</a>;</div><div>   ssl on;</div><div>
   ssl_prefer_server_ciphers off;</div><div>   ssl_certificate   /usr/local/nginx/conf/server.crt;</div><div>   ssl_certificate_key /usr/local/nginx/conf/server.key;</div><div><br></div><div>   access_log /var/log/nginx/mail.access.log main;</div>
<div><br></div><div>   location /somemail {</div><div>     proxy_pass <a href="https://192.168.1.200:443">https://192.168.1.200:443</a>;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>  #proxy_redirect <a href="https://mail.site.com:443/somemail/">https://mail.site.com:443/somemail/</a> /;</div>
<div>     #proxy_redirect off;</div><div>     proxy_set_header  Host       $host;</div><div>     proxy_set_header  X-Real-IP    $remote_addr;</div><div>     proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;</div>
<div>   }</div><div>   location / {</div><div>     proxy_pass <a href="https://192.168.1.200:443">https://192.168.1.200:443</a>;</div><div>     #proxy_redirect <a href="https://mail.site.com:443/somemail/">https://mail.site.com:443/somemail/</a> /;</div>
<div>     proxy_set_header  Host       $host;</div><div>     proxy_set_header  X-Real-IP    $remote_addr;</div><div>     proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;</div>
<div>   }</div><div>   }</div><div>}</div><div><br></div><br><div class="gmail_quote">2010/9/8 Yuriy Taraday <span dir="ltr">&lt;<a href="mailto:yorik.sar@gmail.com">yorik.sar@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<a href="http://nginx.org/en/docs/http/configuring_https_servers.html#name_based_https_servers" target="_blank">http://nginx.org/en/docs/http/configuring_https_servers.html#name_based_https_servers</a><div><br></div><div>
<div> , .</div>

<br></div>
<br>_______________________________________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx-ru" target="_blank">http://nginx.org/mailman/listinfo/nginx-ru</a><br>
<br></blockquote></div><br></div>