nginx reverse proxy server error

Luzbelito

Verified User
Joined
May 20, 2021
Messages
31
hello!
until yesterday everything worked fine. now nginx does not start.
Any ideas?

nginx.service - The nginx HTTP and reverse proxy server
Loaded: loaded (/etc/systemd/system/nginx.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2021-10-22 00:55:07 -03; 44s ago
Process: 5755 ExecStop=/bin/kill -s QUIT $MAINPID (code=exited, status=0/SUCCESS)
Process: 32546 ExecReload=/bin/kill -s HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 32218 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
Process: 23210 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=1/FAILURE)
Main PID: 32221 (code=exited, status=0/SUCCESS)

Oct 22 00:55:07 server01 systemd[1]: Starting The nginx HTTP and reverse proxy server...
Oct 22 00:55:07 server01 nginx[23210]: nginx: [emerg] invalid port in "|IP|:|PORT_80|" of the "listen" directive in /etc/nginx/nginx-vhosts.conf:2
Oct 22 00:55:07 server01 nginx[23210]: nginx: configuration file /etc/nginx/nginx.conf test failed
Oct 22 00:55:07 server01 systemd[1]: nginx.service: control process exited, code=exited status=1
Oct 22 00:55:07 server01 systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Oct 22 00:55:07 server01 systemd[1]: Unit nginx.service entered failed state.
Oct 22 00:55:07 server01 systemd[1]: nginx.service failed.

Thnks and sorry becase my english is so bad.
Pablo.
 
Oct 22 00:55:07 server01 nginx[23210]: nginx: configuration file /etc/nginx/nginx.conf test failed
Check your .conf file, there is something not good

Did you tried to rebuild it ? (assuming you are using NGINX as reverse proxy for apache)
Code:
cd /usr/local/directadmin/custombuild
./build update
./build set webserver nginx_apache
./build nginx_apache
./build rewrite_confs
 
root@Server01-> ./build set webserver nginx_apache
webserver is already set to nginx_apache
root@Server01-> ./build nginx_apache
.....
checking whether we are cross compiling... configure: error: in `/usr/local/directadmin/custombuild/httpd-2.4.51/srclib/apr':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
configure failed for srclib/apr

i try this:
root@Server01-> yum reinstall gcc gcc-c++ make
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 42 kB 00:00
* base: espejito.fder.edu.uy
* epel: mirrors.nipa.cloud
* extras: espejito.fder.edu.uy
* updates: espejito.fder.edu.uy
base | 3.6 kB 00:00
epel | 4.7 kB 00:00
extras | 2.9 kB 00:00
updates | 2.9 kB 00:00
(1/3): epel/x86_64/updateinfo | 1.0 MB 00:00:21
(2/3): updates/7/x86_64/primary_db | 12 MB 00:01:27
(3/3): epel/x86_64/primary_db | 7.0 MB 00:05:34
Installed package gcc-4.8.5-39.el7.x86_64 (from base) not available.
Installed package gcc-c++-4.8.5-39.el7.x86_64 (from base) not available.
Resolving Dependencies
--> Running transaction check
---> Package make.x86_64 1:3.82-24.el7 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================
Reinstalling:
make x86_64 1:3.82-24.el7 base 421 k
Not available:
gcc x86_64 4.8.5-39.el7 - 0.0
gcc-c++ x86_64 4.8.5-39.el7 - 0.0

Transaction Summary
============================================================================================================================================================
Reinstall 1 Package
Not available 2 Packages

any ideas?
 
Solved.
root@Server01-> yum reinstall gcc gcc-c++

and after that update ngnix.
Thnks!
 
Back
Top