àÒÉÊ Ñ ÞÉÔÁÌ ÜÔÕ ÓÔÁÔØÀ. óÅÒÔÉÆÉËÁÔÙ ÎÁ ÓÅÒ×ÅÒÅ, ÇÄÅ ÓÔÏÉÔ 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>