Which init-script starts the nginx server in Rockstor


I am experimenting with setting up a reverse proxy with nginx, so that my rock-ons can be reached by
myrockon.rockstor instead of rockon:234884 (for my wife… :wink:

For this I have
upstream TVGuide.rockstor9999 {
server {
listen 81;
server_name TVGuide.rockstor;
location / {
proxy_pass http://TVGuide.rockstor:9999;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_set_header Host $host;
proxy_redirect off;
as a configuration file for nginx. But when restarting nginx I get the impression that it is already running.
Even after

 systemctl stop nginx && netstat -tulpn | grep 80
 tcp        0      0    *               LISTEN      3833/nginx: master
 tcp        0      0  *               LISTEN      26478/minisatip
 tcp        0      0*               LISTEN      3834/python
 tcp        0      0*               LISTEN      3835/python
 tcp6       0      0 :::8080                 :::*                    LISTEN      16285/docker-proxy
 tcp6       0      0 :::8002                 :::*                    LISTEN      8562/docker-proxy
 tcp6       0      0 :::8008                 :::*                    LISTEN      8552/docker-proxy

So, is nginx maybe started by some other service in rockstor?

By the way: What am I doing wrong so that the “preformated text” option does not work?


hey @henfri! Nginx is started as part of the service named “rockstor”. You’ll see nginx processes in the output of systemctl status rockstor, for example.

The config file is located at /opt/rockstor/etc/nginx/nginx.conf Good luck!

You should check out jwilders nginx auto reverse proxy


thank you Magnus. It works, but I had to change the rockstor-Web-Interface Port to 81 in order to free port 80 for the nginx reverse-proxy. It would be nicer, if this was integrated in Rockstor.

@Suman: What do you think?
It would be pretty neat, if the different services running on Rockstor would be available at myservice.Hostname, don’t you think?