<html 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=iso-2022-jp">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<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;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:10.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-PH" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks for replying. I appreciate the thorough response!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I found the solution online.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">And it worked!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">nano /etc/sysctl.conf # allow processes to bind to the non-local address net.ipv4.ip_nonlocal_bind = 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">sysctl -p /etc/sysctl.conf<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">What do you think about it?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">nginx <nginx-bounces@nginx.org> on behalf of Maxim Dounin <mdounin@mdounin.ru><br>
<b>Date: </b>Thursday, February 16, 2023 at 22:19<br>
<b>To: </b>nginx@nginx.org <nginx@nginx.org><br>
<b>Subject: </b>Re: nginx does not start automatically, what have I done?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Hello!<br>
<br>
On Thu, Feb 16, 2023 at 02:48:23PM +0800, JK wrote:<br>
<br>
>    Hello, it is my first time posting here, and I appreciate the<br>
>    opportunity to share my experience with nginx.<br>
> <br>
> <br>
>    Just to give you background, I am using a VPS from Racknerd, and I use<br>
>    CWP (Control Web Panel), which is pretty similar to cPanel.<br>
> <br>
> <br>
>    I tried to update the repo and use dnf upgrade -y, and what happened<br>
>    was, after restarting the server, nginx did not start automatically.<br>
> <br>
> <br>
>    Here is the log of nginx:<br>
> <br>
> <br>
>    ● nginx.service - The nginx HTTP and reverse proxy server<br>
>       Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled;<br>
>    vendor preset: disabled)<br>
>       Active: failed (Result: exit-code) since Wed 2023-02-15 17:29:03<br>
>    EST; 7h ago<br>
>      Process: 779 ExecStartPre=/usr/sbin/nginx -t (code=exited,<br>
>    status=1/FAILURE)<br>
>      Process: 776 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited,<br>
>    status=0/SUCCESS)<br>
>    Feb 15 17:29:02 racknerd-f5**** systemd[1]: Starting The nginx HTTP and<br>
>    reverse proxy server...<br>
>    Feb 15 17:29:02 racknerd-f5**** nginx[779]: nginx: the configuration<br>
>    file /etc/nginx/nginx.conf syntax is ok<br>
>    Feb 15 17:29:03 racknerd-f5**** nginx[779]: nginx: [emerg] bind() to<br>
>    100.xx.xx.xx:80 failed (99: Cannot assign requested address)<br>
>    Feb 15 17:29:03 racknerd-f5**** nginx[779]: nginx: configuration file<br>
>    /etc/nginx/nginx.conf test failed<br>
>    Feb 15 17:29:03 racknerd-f5**** systemd[1]: nginx.service: Control<br>
>    process exited, code=exited status=1<br>
>    Feb 15 17:29:03 racknerd-f5**** systemd[1]: nginx.service: Failed with<br>
>    result 'exit-code'.<br>
>    Feb 15 17:29:03 racknerd-f5**** systemd[1]: Failed to start The nginx<br>
>    HTTP and reverse proxy server.<br>
> <br>
> <br>
>    The solution is to manually start nginx after a minute or two.<br>
<br>
The error message "bind() to 100.xx.xx.xx:80 failed (99: Cannot <br>
assign requested address)" suggests the IP address you are trying <br>
to use is not available when nginx starts.<br>
<br>
Possible options to fix this include:<br>
<br>
- Make sure nginx systemd service properly depends on the network <br>
  being available (After=/Wants= network-online.target is usually <br>
  good enough, though you may need to also enable proper wait <br>
  service, see [1]).<br>
<br>
- Reconfigure nginx to listen on the wildcard address instead, so <br>
  it won't try to bind on IP addresses not yet available when it <br>
  starts.<br>
<br>
Hope this helps.<br>
<br>
[1] <a href="https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/">https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/</a><br>
<br>
-- <br>
Maxim Dounin<br>
<a href="http://mdounin.ru/">http://mdounin.ru/</a><br>
_______________________________________________<br>
nginx mailing list<br>
nginx@nginx.org<br>
<a href="https://mailman.nginx.org/mailman/listinfo/nginx">https://mailman.nginx.org/mailman/listinfo/nginx</a><o:p></o:p></span></p>
</div>
</div>
</body>
</html>