The officially official Devuan Forum!

You are not logged in.

#1 2023-01-21 22:02:08

dcolburn
Member
Registered: 2022-11-02
Posts: 280  

[SOLVED] Restart nginx question

A quick question, please?

Does nginx -s reload (as root) accomplish the same thing as sudo systemctl restart nginx.service, please?

Thanks

Offline

#2 2023-01-21 22:13:37

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Restart nginx question

Almost:

https://salsa.debian.org/nginx-team/ngi … ervice#L24

EDIT: or use

# /etc/init.d/nginx restart

https://salsa.debian.org/nginx-team/ngi … #L132-L156

Last edited by Head_on_a_Stick (2023-01-21 22:16:04)


Brianna Ghey — Rest In Power

Offline

#3 2023-01-21 22:27:24

dcolburn
Member
Registered: 2022-11-02
Posts: 280  

Re: [SOLVED] Restart nginx question

nginx restart errors

invalid option: "restart"

I'm not sure what to make of the salsa.debian.org pages ... do I need to edit something so that nginx -s reload is the same as nginx restart?

Offline

#4 2023-01-21 22:36:31

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Restart nginx question

dcolburn wrote:

nginx restart

That's not what I posted hmm

EDIT: the first salsa link shows the ExecReload line from the systemd unit file for nginx; that command is what is run when systemctl restart nginx is called.

Better to use the init script instead though, hence my suggestion in the code block.

Last edited by Head_on_a_Stick (2023-01-21 22:39:55)


Brianna Ghey — Rest In Power

Offline

#5 2023-01-21 23:05:45

Marjorie
Member
From: Teignmouth, UK
Registered: 2019-06-09
Posts: 219  

Re: [SOLVED] Restart nginx question

Alternatively use either 

sudo service nginx restart

or

su - 
service nginx restart

depending on whether you have a root password or not.

Offline

#6 2023-01-21 23:09:32

dcolburn
Member
Registered: 2022-11-02
Posts: 280  

Re: [SOLVED] Restart nginx question

Head_on_a_Stick wrote:
dcolburn wrote:

nginx restart

That's not what I posted hmm

EDIT: the first salsa link shows the ExecReload line from the systemd unit file for nginx; that command is what is run when systemctl restart nginx is called.

Better to use the init script instead though, hence my suggestion in the code block.

That's me missing a detail, again ...

I was sitting at /etc/nginx/ and missed the /init.d/ .. sigh.

All good, thanks!

Onward ...

Offline

#7 2023-01-21 23:11:07

dcolburn
Member
Registered: 2022-11-02
Posts: 280  

Re: [SOLVED] Restart nginx question

Marjorie wrote:

Alternatively use either 

sudo service nginx restart

or

su - 
service nginx restart

depending on whether you have a root password or not.

OK, cool, I'm in root but

sudo service nginx restart

ran fine.

Thanks

Offline

Board footer