New update (1.3.4) - overwritten manually edited nginx conf files

my hestiacp auto updated to 1.3.4 now nginx not working on my ubuntu 18.04 server. please help

I found that one of my sites didn’t come up after the update, although most of them did. These commands, (with sudo if needed) fixed it.

v-rebuild-web-domain user
systemctl restart apache2.service 
systemctl restart nginx.service

getting this error

Failed to restart nginx.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files

Maybe you’re not running nginx? Did you install Apache only? In which case you can ignore it. I was covering all the bases.

Not enough information to go on i’m afraid.

I would start with looking into:

systemctl restart nginx
systemctl status nginx
nginx -t
cat /var/log/nginx/error.log

i’m using nginx + php-fpm, after the update i can’t start the nginx server thorugh the CP.

systemctl status nginx

  • nginx.service - LSB: Stop/start nginx
    Loaded: loaded (/etc/init.d/nginx; generated)
    Active: active (exited) since Fri 2021-03-19 11:43:11 UTC; 5s ago
    Docs: man:systemd-sysv-generator(8)
    Process: 3610 ExecStop=/etc/init.d/nginx stop (code=exited, status=0/SUCCESS)
    Process: 2783 ExecReload=/etc/init.d/nginx reload (code=exited, status=0/SUCCE
    Process: 3612 ExecStart=/etc/init.d/nginx start (code=exited, status=0/SUCCESS
    Main PID: 1325 (code=exited, status=0/SUCCESS)

nginx -t
Command 'nginx' not found, but can be installed with:

what’s the output of:

dpkg -l |grep nginx
dpkg -l |grep apache

$ dpkg -l |grep nginx

ii hestia-nginx 1.19.8 amd64 hestia Nginx
rc nginx 1.19.8-1~bionic amd64 high performance web server

$ dpkg -l |grep apache

ii apache2 amd64 Apache HTTP Server
ii apache2-bin amd64 Apache HTTP Server (modules and other binary files)
ii apache2-data all Apache HTTP Server (common files)
ii apache2-suexec-custom amd64 Apache HTTP Server configurable suexec program for mod_suexec
ii apache2-utils amd64 Apache HTTP Server (utility programs for web servers)
ii libapache2-mod-fcgid 1:2.3.9-1 amd64 FastCGI interface module for Apache 2
ii libapache2-mod-rpaf 0.6-13 amd64 module for Apache2 which takes the last IP from the ‘X-Forwarded-For’ header

did you use apache2 before or had it at least installed?
otherwise it looks like nginx might have been removed in favour of (standalone) apache2 :roll_eyes:

i’m not sure about apache. i’m only use nginx+phpfpm for my server. but everything working properly untill the last update.

now my sites down including phpmyadmin

maybe check /var/log/apt/term.log for entries of last night, to see what happened.

also run

apt install nginx

Can you put the term.log + history.log files on pastebin and PM me the link ?

PM sent

Logs received thx.

Going trough them saw that last night nginx was removed, installed back and then removed again :smiley:

Start-Date: 2021-03-19  03:01:57
Commandline: apt install hestia-nginx -y
Requested-By: xxxxxxx (1000)
Install: hestia-nginx:amd64 (1.19.8)
End-Date: 2021-03-19  03:02:09
Start-Date: 2021-03-19  03:05:09
Commandline: apt-get remove nginx
Requested-By: xxxxxxx (1000)
Remove: nginx:amd64 (1.19.6-1~bionic)
End-Date: 2021-03-19  03:05:11
Start-Date: 2021-03-19  03:06:05
Commandline: apt-get install nginx
Requested-By: xxxxxxx (1000)
Install: nginx:amd64 (1.19.8-1~bionic)
End-Date: 2021-03-19  03:06:07
Start-Date: 2021-03-19  03:19:44
Commandline: apt-get remove nginx
Requested-By: xxxxxxx (1000)
Remove: nginx:amd64 (1.19.8-1~bionic)
End-Date: 2021-03-19  03:19:45

used to edit nginx.conf from conf/web/ directory to rewrite urls. after the update the nginx.conf file restored with default. so i made a back of new nginx.conf as “nginx.conf_old” and restored my previous conf file. the nginx.conf_old made the nginx restart failure. then i search for a fix and found remove nginx and reinstall it from somewhere that you find out from the log.

so the hestiacp update not broke my nginx. i am really sorry for wasting your time. thanks

1 Like

that’s what the big header in each of these files is for. saying DO NOT EDIT - MIGHT BE OVERWRITTEN :man_shrugging:t2:

you should seriously overthink that and either put your changes in an include-file or create a proper template with your changes. most of the future updates but also other changes in the panel might lead to a rewrite of the domains config and therefore always remove your changes.

and the removal of nginx then was you manually probably trying to fix it? that’s some info that would be needed from the beginning if looking for support.

so please everyone for the future take a minute and collect and provide as much information as possible if you are going to open topic, because something broke.
we are willing to help, but we need to know what your system looks like, what customization there are, what you tried already to maybe fix it, what’s exactly in the logfiles or error messages and so on. thanks in advance.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.