Hello there,
I am trying to set up reverse proxies via nginx-proxy-manager, and I am having troubles setting port 80 for it, because Rockstor’s nginx is using it.
Even though I have changed port 80 → 89 in nginx.conf/.default and reloaded nginx, it still uses port 80.
Even if I kill all nginx services and let the supervisor to bring it back, it will still use port 80.
Many users had solutions in pre-SUSE era, but they don’t work anymore.
Thanks.
phillxnet
(Philip Guyton)
April 22, 2023, 5:13pm
2
@aremiaskfa Hello again.
Re:
aremiaskfa:
Even though I have changed port 80 → 89 in nginx.conf/.default and reloaded nginx, it still uses port 80.
Even if I kill all nginx services and let the supervisor to bring it back, it will still use port 80.
In the more recent versions of Rocsktor (testing) we use a systemd configuration override arrangement.
Take a look at the following pull request:
rockstor:testing
← phillxnet:2436_Rename_our_nginx_drop-in_override_systemd_file
opened 11:38AM - 07 Dec 22 UTC
To comply with upstream guidance we add "30-" to our recently added rockstor-ngi… nx-override.conf systemd override file.
We do not clean up our prior un-numbered variant as it was not included in any official released.
See: https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines#Shipping_unit_file_drop-ins
Includes black formatting: missed in recent commits.
Fixes #2436
Where we updated this files name to 30-rockstor-nginx-override.conf
[Unit]
Description=The nginx HTTP and reverse proxy server - 30-rockstor-nginx-override.conf
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
[Service]
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -c /opt/rockstor/etc/nginx/nginx.conf
# we first 'clean' the ExecStart as we are an override config
ExecStart=
ExecStart=/usr/sbin/nginx -c /opt/rockstor/etc/nginx/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=mixed
PrivateTmp=true
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=read-only
This file has been truncated. show original
As you see in that file we start nginx with the following directive:
[Unit]
Description=The nginx HTTP and reverse proxy server - 30-rockstor-nginx-override.conf
After=network-online.target remote-fs.target nss-lookup.target
Wants=network-online.target
[Service]
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -c /opt/rockstor/etc/nginx/nginx.conf
# we first 'clean' the ExecStart as we are an override config
ExecStart=
ExecStart=/usr/sbin/nginx -c /opt/rockstor/etc/nginx/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=mixed
PrivateTmp=true
# added automatically, for details please see
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
ProtectSystem=full
ProtectHome=read-only
PrivateDevices=true
So changing the /opt/rockstor/etc/nginx/nginx.conf file on your system may do the trick for you.
Hope that helps.
3 Likes
Nice. I will wait for the update. Thanks
phillxnet
(Philip Guyton)
April 23, 2023, 4:33pm
4
@aremiaskfa Hello again.
Re:
The referenced files/mechnisms are actually all already in place within our testing channel. So if you are already running that then you can steam-in with altering the referenced files and let us know if this worked for your.
Hope that helps.
2 Likes