Using Nginx on Mageia 3

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Using Nginx on Mageia 3

Postby flexxall » Mar 18th, '13, 16:43

Hello,
I have installed nginx from the repo. f i reboot my system I can connect to localhost and i get the nginx install page. However if I try to start/restart the service I get the following errors.
Code: Select all
flexxall@localhost ~]$ sudo systemctl start nginx
[sudo] password for flexxall:
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -n' for details.
[flexxall@localhost ~]$ systemctl status nginx.service
nginx.service - A high performance web server and reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
     Active: failed (Result: exit-code) since Mon, 2013-03-18 09:30:46 CDT; 13s ago
    Process: 2742 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=127)
     CGroup: name=systemd:/system/nginx.service

[flexxall@localhost ~]$


I have checked the path and it all seems ok the error code 127 is reported as
Code: Select all
127   "command not found"   illegal_command   Possible problem with $PATH or a typo


I have tried to edit the nginx.service file and I cant get rid of the error code.

Any input on how to correct this issue ?
flexxall
 
Posts: 6
Joined: Mar 15th, '13, 16:35

Re: Using Nginx on Mageia 3

Postby doktor5000 » Mar 18th, '13, 18:16

Well, shouldn't it be
Code: Select all
systemctl start nginx.service
(you can also use service nginx start - the old style is still supported as a wrapper by systemd)
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Using Nginx on Mageia 3

Postby flexxall » Mar 18th, '13, 21:25

doktor5000 wrote:Well, shouldn't it be
Code: Select all
systemctl start nginx.service
(you can also use service nginx start - the old style is still supported as a wrapper by systemd)


This returns the same error.

Code: Select all
[flexxall@localhost ~]$ systemctl start nginx.service
Failed to issue method call: Access denied
[flexxall@localhost ~]$ sudo systemctl start nginx.service
[sudo] password for flexxall:
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -n' for details.
[flexxall@localhost ~]$ systemctl status nginx.service
nginx.service - A high performance web server and reverse proxy server
     Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled)
     Active: failed (Result: exit-code) since Mon, 2013-03-18 14:24:41 CDT; 12s ago
    Process: 20306 ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf (code=exited, status=127)
     CGroup: name=systemd:/system/nginx.service

[flexxall@localhost ~]$
flexxall
 
Posts: 6
Joined: Mar 15th, '13, 16:35

Re: Using Nginx on Mageia 3

Postby doktor5000 » Mar 18th, '13, 22:03

Can you please show the output of
Code: Select all
rpm -qa | grep apache
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Using Nginx on Mageia 3

Postby flexxall » Mar 18th, '13, 22:52

doktor5000 wrote:Can you please show the output of
Code: Select all
rpm -qa | grep apache

Apache is not installed
Code: Select all
[flexxall@localhost ~]$ rpm -qa | grep apache
[flexxall@localhost ~]$
flexxall
 
Posts: 6
Joined: Mar 15th, '13, 16:35

Re: Using Nginx on Mageia 3

Postby doktor5000 » Mar 18th, '13, 23:44

If i remember correctly, it needs one of the apache packages, one that holds shared configuration which other webservers also use, but as i don't use webservers, currently can't tell which one exactly :/

At least there is a way to run nginx, all our webservers at Mageia run nginx.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Using Nginx on Mageia 3

Postby flexxall » Mar 18th, '13, 23:51

Well it will run after i reboot the system. I should not have to restart the server though if I change a configuration file :(
flexxall
 
Posts: 6
Joined: Mar 15th, '13, 16:35

Re: Using Nginx on Mageia 3

Postby doktor5000 » Mar 19th, '13, 00:10

Well, in that case you can send the SIGHUP (hang up) signal to the process id, that does the same.
Or is there no dedicated binary like for apache, where you can do apachectl graceful to reload configs?

Admittedly, it's only a workaround, and ultimately needs to be fixed properly.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18018
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest