<div><div dir="auto"><br></div><div dir="auto">Hello!</div><div dir="auto"><br></div><div dir="auto">> I <span style="background-color:rgba(0,0,0,0);border-color:rgb(0,0,0) rgb(0,0,0) rgb(0,0,0) rgb(204,204,204);color:rgb(0,0,0)">found that port 80 is being used by both task "System" by user</span> <div dir="auto"><span style="font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0) rgb(0,0,0) rgb(0,0,0) rgb(204,204,204);color:rgb(0,0,0)">"SYSTEM" for "NT Kernel and System"</span><br style="color:rgb(0,0,0);font-family:-apple-system,HelveticaNeue;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0) rgb(0,0,0) rgb(0,0,0) rgb(204,204,204);color:rgb(0,0,0)">with a PID of 4 and also for task "System Idle Process" by user "SYSTEM"<span class="Apple-converted-space"> </span></span><br style="color:rgb(0,0,0);font-family:-apple-system,HelveticaNeue;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0) rgb(0,0,0) rgb(0,0,0) rgb(204,204,204);color:rgb(0,0,0)">for</span><br style="color:rgb(0,0,0);font-family:-apple-system,HelveticaNeue;font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0) rgb(0,0,0) rgb(0,0,0) rgb(204,204,204);color:rgb(0,0,0)">"Percentage of time the processor is idle" with a PID of 0.</span></div><div dir="auto"><span style="font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0) rgb(0,0,0) rgb(0,0,0) rgb(204,204,204);color:rgb(0,0,0)"><br></span></div><div dir="auto"><span style="font-size:16px;font-style:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;float:none;display:inline!important;background-color:rgba(0,0,0,0);border-color:rgb(0,0,0) rgb(0,0,0) rgb(0,0,0) rgb(204,204,204);color:rgb(0,0,0)">This is typically the </span><span style="font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px;color:rgb(12,13,14)">Web Deployment Agent Service (MsDepSvc) (this often uses PID4) or Host Network Service - both stoppable from from services.msc</span></div><div dir="auto"><span style="font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px;color:rgb(12,13,14)"><br></span></div><div dir="auto"><span style="font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px;color:rgb(12,13,14)">Let us know how you get on! </span></div><div dir="auto"><span style="font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px;color:rgb(12,13,14)"><br></span></div><div dir="auto"><span style="font-family:-apple-system,BlinkMacSystemFont,"Segoe UI Adjusted","Segoe UI","Liberation Sans",sans-serif;font-size:15px;color:rgb(12,13,14)"><br></span></div></div><div dir="auto">On Sat, 3 Feb 2024 at 18:51, Victor Oppenheimer <<a href="mailto:victor@camb.com" target="_blank">victor@camb.com</a>> wrote:<br></div></div><div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">I am trying to run nginx as a reverse proxy server on my Microsoft Windows<br>
Server 2016 Standard computer.<br>
<br>
I previously have used Microsoft IIS and Apache Tomcat on this computer to<br>
serve webpages on port 80 and port 8080 respectively.<br>
<br>
However, I want to have some of my websites use SSL and be accessed<br>
using HTTPS.<br>
<br>
So, I decided to install the nginx web server software on<br>
the computer. I planned to using it as a reverse proxy server which<br>
would receive both insecure HTML and secure HTTPS webpage requests and<br>
then proxy them to the appropriate software webservers on the same<br>
computer.<br>
<br>
I changed all the IIS sites that had been using port 80 to use port 81 <br>
instead.<br>
I then wrote the nginx.conf configuration file which listens on port 80 <br>
for each of<br>
my server_names and then proxy the page requests to the appropriate <br>
software webserver.<br>
<br>
Once that works, I plan to install the SSL certificates in nginx and <br>
process secure<br>
HTMLS requests as well.<br>
<br>
But nginx fails to start on the computer. It produces the following <br>
error message.<br>
bind() to <a href="http://0.0.0.0:80" rel="noreferrer" target="_blank">0.0.0.0:80</a> failed (10013: An attempt was made to access <br>
a socket in a way<br>
forbidden by its access permissions)<br>
<br>
Because the message appears to indicate that there is a conflict using <br>
port 80 decided<br>
to see which tasks were using port 80. To do so, I opened a command <br>
window with<br>
administrative privileges and ran the following command:<br>
netstat -ano | findstr :80<br>
<br>
I then examined the output for entries with a state of "LISTENING" and a <br>
local address<br>
of "<a href="http://0.0.0.0:80" rel="noreferrer" target="_blank">0.0.0.0:80</a>" or ":::80" (IPv6). The output's "PID" column provided <br>
the process ID<br>
(PID) of the process using port 80.<br>
<br>
I then used Task Manager to find the process names associated with that <br>
PIDs.<br>
<br>
I found that port 80 is being used by both task "System" by user <br>
"SYSTEM" for "NT Kernel and System"<br>
with a PID of 4 and also for task "System Idle Process" by user "SYSTEM" <br>
for<br>
"Percentage of time the processor is idle" with a PID of 0.<br>
<br>
I then tried to open nginx on my Windows 11 pro home desktop computer. <br>
It opened successfully<br>
and functioned doing reverse proxying as I desired. For comparison <br>
sake, I looked at the<br>
tasks using port 80 as I had on my windows server. On the desktop, the <br>
only task using port<br>
80 is nginx.<br>
<br>
I then changed the nginx listening directives on the Windows Server <br>
computer to listen on<br>
port 90 rather than port 80. After this change on the MS Windows Server <br>
2016 nginx<br>
succeeded in starting and performed reverse proxying successfully.<br>
<br>
This seems to indicate that the problem is with a conflict in the use of <br>
port 80 rather than in my<br>
nginx configuration.<br>
<br>
However, remote website users browse to my website pages using the <br>
default port of 80 rather than port 90.<br>
<br>
How can I make the system work?<br>
<br>
For completeness I am copying the nginx.conf file listening on port 80 <br>
below.<br>
<br>
# directives in the 'main' context<br>
worker_processes 1;<br>
events { # events context/block<br>
# configuration of connection processing<br>
}<br>
<br>
http { # http context specific to HTTP affecting all virtual servers<br>
server_names_hash_bucket_size 64; # avoids error message for <br>
multiple server_Name entries<br>
<br>
server { # configuration of yogisource HTTP virtual port 80 server<br>
listen 80;<br>
server_name <a href="http://yogisource.com" rel="noreferrer" target="_blank">yogisource.com</a> <a href="http://www.yogisource.com" rel="noreferrer" target="_blank">www.yogisource.com</a>;<br>
<br>
location / {<br>
proxy_pass <a href="http://yogisource.com:81/" rel="noreferrer" target="_blank">http://yogisource.com:81/</a>;<br>
} # end of location block<br>
} # end of yogisource server block<br>
<br>
server { # configuration of clearwaterescapes HTTP virtual port 80 <br>
server<br>
listen 80;<br>
server_name <a href="http://clearwaterescapes.com" rel="noreferrer" target="_blank">clearwaterescapes.com</a> <a href="http://www.clearwaterescapes.com" rel="noreferrer" target="_blank">www.clearwaterescapes.com</a>;<br>
<br>
location / {<br>
# send local host requests of the form <br>
<a href="http://clearwaterescapes.com" rel="noreferrer" target="_blank">http://clearwaterescapes.com</a> to<br>
# <a href="http://clearwaterescapes.com:8080/vo/Clearwater" rel="noreferrer" target="_blank">http://clearwaterescapes.com:8080/vo/Clearwater</a><br>
proxy_pass <a href="http://clearwaterescapes.com:8080/vo/Clearwater/" rel="noreferrer" target="_blank">http://clearwaterescapes.com:8080/vo/Clearwater/</a>;<br>
} # end of location block<br>
<br>
location /camp/ {<br>
proxy_pass <br>
<a href="http://clearwaterescapes.com:8080/vo/Clearwater/Camp/?Prop=2" rel="noreferrer" target="_blank">http://clearwaterescapes.com:8080/vo/Clearwater/Camp/?Prop=2</a>;<br>
} # end of location block<br>
<br>
# // <a href="http://clearwaterescapes.com:81/Clearwater/Camp/camprental.pdf" rel="noreferrer" target="_blank">http://clearwaterescapes.com:81/Clearwater/Camp/camprental.pdf</a> <br>
works ...<br>
<br>
# The following Nginx location directives sends <a href="http://clearwaterescapes.com" rel="noreferrer" target="_blank">clearwaterescapes.com</a> <br>
urls<br>
# containing case insensitive "camp" or "house" to ClearwaterEscapes on<br>
# port 81 where to be served by the Microsoft IIS server<br>
<br>
location ~* ^/camp/ {<br>
set $proxy_pass_url <a href="http://ClearwaterEscapes.com:81/camp/" rel="noreferrer" target="_blank">http://ClearwaterEscapes.com:81/camp/</a>;<br>
proxy_pass $proxy_pass_url;<br>
# proxy_pass <a href="http://ClearwaterEscapes.com:81/camp/" rel="noreferrer" target="_blank">http://ClearwaterEscapes.com:81/camp/</a> ;<br>
} # end of location block<br>
<br>
location ~* ^/House/ {<br>
set $proxy_pass_url <a href="http://ClearwaterEscapes.com:81/house/" rel="noreferrer" target="_blank">http://ClearwaterEscapes.com:81/house/</a>;<br>
proxy_pass $proxy_pass_url;<br>
} # end of location block<br>
<br>
} # end of ClearwaterEscapes server block<br>
<br>
server { # configuration of freshpondrentals HTTP virtual port 80 <br>
server<br>
listen 80;<br>
server_name <a href="http://freshpondrentals.com" rel="noreferrer" target="_blank">freshpondrentals.com</a> <a href="http://www.freshpondrentals.com" rel="noreferrer" target="_blank">www.freshpondrentals.com</a>;<br>
<br>
location / {<br>
# send local host requests of the form <br>
<a href="http://freshpondrentals.com" rel="noreferrer" target="_blank">http://freshpondrentals.com</a> to<br>
# <a href="http://freshpondrentals.com:8080/vo/camb" rel="noreferrer" target="_blank">http://freshpondrentals.com:8080/vo/camb</a><br>
<br>
proxy_pass <a href="http://freshpondrentals.com:8080/vo/camb/" rel="noreferrer" target="_blank">http://freshpondrentals.com:8080/vo/camb/</a>;<br>
} # end of location block<br>
<br>
location /StudioApartment/ {<br>
# send local host requests of the form<br>
# <a href="http://freshpondrentals.com/camb/StudioApartment" rel="noreferrer" target="_blank">http://freshpondrentals.com/camb/StudioApartment</a><br>
# to<br>
# <a href="http://freshpondrentals.com:8080/vo/camb/StudioApartment" rel="noreferrer" target="_blank">http://freshpondrentals.com:8080/vo/camb/StudioApartment</a><br>
proxy_pass <br>
<a href="http://freshpondrentals.com:8080/vo/camb/StudioApartment/index.jsp/" rel="noreferrer" target="_blank">http://freshpondrentals.com:8080/vo/camb/StudioApartment/index.jsp/</a>;<br>
} # end of location block<br>
<br>
} # end of freshpondrentals server block<br>
<br>
server { # configuration of oppsprops HTTP virtual port 80 server<br>
listen 80;<br>
server_name <a href="http://oppsprops.com" rel="noreferrer" target="_blank">oppsprops.com</a> <a href="http://www.oppsprops.com" rel="noreferrer" target="_blank">www.oppsprops.com</a>;<br>
<br>
# listen 443 ssl;<br>
# ssl_certificate "C:/nginx/conf/ssl/certs/oppsprops.com.crt";<br>
# ssl_certificate_key "C:/nginx/conf/ssl/keys/oppsprops.com.key";<br>
#<br>
# location / {<br>
# proxy_pass <a href="http://oppsprops.com:81/" rel="noreferrer" target="_blank">http://oppsprops.com:81/</a>;<br>
# } # end of location block<br>
<br>
location ~ /.jsp$ {<br>
set $proxy_pass_url <a href="http://oppsprops.com:8080" rel="noreferrer" target="_blank">http://oppsprops.com:8080</a>;<br>
proxy_pass $proxy_pass_url;<br>
} # end of location block<br>
<br>
location / {<br>
proxy_pass <a href="http://oppsprops.com:8080/" rel="noreferrer" target="_blank">http://oppsprops.com:8080/</a>;<br>
} # end of location block<br>
} # end of oppsprops server block<br>
<br>
} # end of http block<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="https://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">https://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div></div>
</div>