Apologies, but I'm a relative newbie to RPi & nginx.
I was having an issue with nginx on my Raspberry Pi 3B, and for some reason I thought it would be a good idea to remove and re-install it.
Before I removed it the files were located where I expected them to be, ie /etc/nginx. After I re-installed the files are seemingly all over the place (/usr/lib/nginx, /var/lib/nginx etc).
I Googled for articles on installing nginx on RPi and all seem to indicate the same result, i.e. the setup I had originally.
Am I missing something?
Thanks,
Phil
*** UPDATE 2021-01-21 *** In answer to some questions:
- To remove & re-install nginx I did the following;
sudo apt remove nginx
sudo apt install nginx
I also tried;
sudo apt purge nginx
sudo apt install nginx
*** UPDATE 2021-01-21 P2 ***
pi@raspberrypi:~ $ cat /etc/apt/sources.list
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
pi@raspberrypi:~ $ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ stretch main ui
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ stretch main ui
pi@raspberrypi:~ $
Looks like my RPi3B is running Stretch.
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $
Not sure if that is part of the problem.
The Pi is only running Pi-Hole for my home network, so I could backup my Pi-Hole config, do a clean install of the latest Pi OS image, install Pi-Hole and restore the config. It's a bit of a sledgehammer approach but should restore me to a nice clean setup ready to start again (and clear out some of the old dross that I had previously partially installed and never really used).
/usr/lib/nginx
- not sure what populates/var/lib/nginx
but there's definitely stuff there too on my rpinginx
? Please edit the question and add it there.