<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Calibri Light";
panose-1:2 15 3 2 2 2 4 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Arial Narrow";
panose-1:2 11 6 6 2 2 2 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hello. I am very new to Nginx and need some assistance with my config. This is on a windows server and will be listening on 80,18080, 443 and 18081. Traffic comes in to www.myserver.com and is passed to my Windows Nginx server by the firewall.
I need to be able to listen and pass traffic on both 443 and 18081 for HTTPS traffic. I also need to know how to specify my certificate paths on a windows server so SSL works properly. The server also listens on port 80 and 18080 for HTTP traffic. I am completely
new to Nginx and am quite lost in how this config should be structured. <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This is my what i have been able to put together from examples I found on the web and it doesnt fully work. The way it’s supposed to work is that the traffic comes in on 443 for the initial request. The webpage presented to the client
then loads a page over 18081 and that is what allows the logon to the webpage. The same happens if traffic comes in over 80. The website replies with a webpage that then loads over 18080.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#user nobody;<o:p></o:p></p>
<p class="MsoNormal">worker_processes 1;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#error_log logs/error.log;<o:p></o:p></p>
<p class="MsoNormal">#error_log logs/error.log notice;<o:p></o:p></p>
<p class="MsoNormal">#error_log logs/error.log info;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">#pid logs/nginx.pid;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">events {<o:p></o:p></p>
<p class="MsoNormal"> worker_connections 1024;<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal">http{<o:p></o:p></p>
<p class="MsoNormal">server{<o:p></o:p></p>
<p class="MsoNormal"> listen 80;<o:p></o:p></p>
<p class="MsoNormal"> server_name www.mywebsite.com;<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> location / {<o:p></o:p></p>
<p class="MsoNormal"> proxy_pass http://1.2.3.4/;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> error_page 500 502 503 504 /50x.html;<o:p></o:p></p>
<p class="MsoNormal"> location = /50x.html {<o:p></o:p></p>
<p class="MsoNormal"> root html;<o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> }<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> listen 18080;<o:p></o:p></p>
<p class="MsoNormal"> server_name 1.2.3.4:18080;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> location / {<o:p></o:p></p>
<p class="MsoNormal"> proxy_pass http://1.2.3.4/;<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"> listen 18081;<o:p></o:p></p>
<p class="MsoNormal"> server_name 1.2.3.4:18081;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> location / {<o:p></o:p></p>
<p class="MsoNormal"> proxy_pass https://1.2.3.4/;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> listen 443;<o:p></o:p></p>
<p class="MsoNormal"> server_name 1.2.3.4;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> location / {<o:p></o:p></p>
<p class="MsoNormal"> proxy_pass https://1.2.3.4/;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> # ssl_certificate cert.pem;<o:p></o:p></p>
<p class="MsoNormal"> # ssl_certificate_key cert.key;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> # ssl_session_cache shared:SSL:1m;<o:p></o:p></p>
<p class="MsoNormal"> # ssl_session_timeout 5m;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> # ssl_ciphers HIGH:!aNULL:!MD5;<o:p></o:p></p>
<p class="MsoNormal"> # ssl_prefer_server_ciphers on;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> # location / {<o:p></o:p></p>
<p class="MsoNormal"> # root html;<o:p></o:p></p>
<p class="MsoNormal"> # index index.html index.htm;<o:p></o:p></p>
<p class="MsoNormal"> # }<o:p></o:p></p>
<p class="MsoNormal"> #}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal">}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Calibri Light",sans-serif;color:gray">Bryan Townsend<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Calibri Light",sans-serif;color:gray">Corporate IT Systems</span></b><b><span style="font-size:9.0pt;color:gray"><o:p></o:p></span></b></p>
<p class="MsoNormal"><img width="92" height="10" id="Picture_x0020_1" src="cid:image001.jpg@01D621FF.982F6BB0" alt="cid:image005.jpg@01CF7CD9.9A23F930"><o:p></o:p></p>
<p class="MsoNormal" style="margin-top:2.0pt"><span style="font-size:8.0pt;font-family:"Arial Narrow",sans-serif;color:#7F7F7F;position:relative;top:1.0pt;mso-text-raise:-1.0pt;letter-spacing:1.0pt">9111 North Freeway | Houston, TX 77037</span><span style="font-size:8.0pt;font-family:"Arial Narrow",sans-serif;color:#7F7F7F"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Arial Narrow",sans-serif;color:#3B3838">281-249-4622</span><span style="font-size:8.0pt;font-family:"Arial Narrow",sans-serif;color:#7F7F7F;position:relative;top:1.0pt;mso-text-raise:-1.0pt;letter-spacing:1.0pt">|</span><span style="font-size:8.0pt;font-family:"Arial Narrow",sans-serif;color:#7F7F7F">
| </span><span style="font-size:8.0pt;font-family:"Arial Narrow",sans-serif"><a href="mailto:Bryan.Townsend@doggett.com"><span style="color:blue">Bryan.Townsend@doggett.com</span></a><span style="color:#7F7F7F"> |
</span></span><a href="http://www.doggett.com/"><span style="font-size:8.0pt;font-family:"Arial Narrow",sans-serif;color:#2E74B5">www.doggett.com</span></a><span style="font-size:8.0pt;font-family:"Arial Narrow",sans-serif;color:#2E74B5">
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Arial Narrow",sans-serif;color:#2E74B5"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><i>Service Desk Support</i></b><i> |(281) 249-4590 or x22835 |
<a href="mailto:helpdesk@doggett.com"><span style="color:blue">helpdesk@doggett.com</span></a> |
<a href="http://www.doggett.com/"><span style="color:blue">www.doggett.com</span></a><o:p></o:p></i></p>
<p class="MsoNormal"><span style="color:#0070C0"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><i><span style="font-size:8.0pt;font-family:"Arial Narrow",sans-serif">This email message, including any attachments, is for the sole use of the intended recipient(s) and may be confidential, privileged, proprietary or otherwise protected
from disclosure. If you received this message in error, please notify the sender immediately.<o:p></o:p></span></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>