Needing assistance with Nginx 1.17.9 Windows install

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Needing assistance with Nginx 1.17.9 Windows install

Bryan Townsend

 

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.

 

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.

 

#user  nobody;

worker_processes  1;

 

#error_log  logs/error.log;

#error_log  logs/error.log  notice;

#error_log  logs/error.log  info;

 

#pid        logs/nginx.pid;

 

 

events {

    worker_connections  1024;

   

}

http{

server{

     listen 80;

                  server_name www.mywebsite.com;

               

                 location / {

                   proxy_pass http://1.2.3.4/;

 

        error_page   500 502 503 504  /50x.html;

        location = /50x.html {

            root   html;

        }

     

    }

 

        listen       18080;

           server_name  1.2.3.4:18080;

 

        location / {

                   proxy_pass http://1.2.3.4/;

  

        listen       18081;

           server_name  1.2.3.4:18081;

 

        location / {

                   proxy_pass https://1.2.3.4/;

 

        listen       443;

        server_name  1.2.3.4;

 

        location / {

                   proxy_pass https://1.2.3.4/;

 

    #    ssl_certificate      cert.pem;

    #    ssl_certificate_key  cert.key;

 

    #    ssl_session_cache    shared:SSL:1m;

    #    ssl_session_timeout  5m;

 

    #    ssl_ciphers  HIGH:!aNULL:!MD5;

    #    ssl_prefer_server_ciphers  on;

 

    #    location / {

    #        root   html;

    #        index  index.html index.htm;

    #    }

    #}

 

}

}

 

Bryan Townsend

Corporate IT Systems

cid:image005.jpg@01CF7CD9.9A23F930

9111 North Freeway | Houston, TX 77037

281-249-4622| | [hidden email] | www.doggett.com

 

Service Desk Support |(281) 249-4590 or x22835 | [hidden email] | www.doggett.com

 

 

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.

 


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx