Has anyone got a working passenger with nginx-module installation on arch linux?

January 22, 2014 5.6k views
I have for a couple of days now tried to get passenger-install-nginx-module to work on my Arch linux droplet. But with no luck. The installation runs smooth, and everythings seems to be working nicely. I have set up the conf file and I am ready to start nginx, but from here on, nothing works. "sudo systemctl start nginx" says that no such file exists and is unable to start nginx. It is no problem to start nginx in this way if I install nginx without passenger, but when it is installed through the passenger-install-nginx-module command, it is unable to start. I find this very odd, and I am curious of how you other guys have gotten this to work on arch.
4 Answers
Update when running "systemctl start nginx" i get this error: Job for nginx.service failed.
#run the nginx config test first
nginx -t

#find the systemd services which fail to start
systemctl --state=failed

systemctl status nginx
#you should see at the end somthing like
Process: 18570 ExecStart=/usr/lib/systemd/.......

#Check the messages for the errors
journalctl -b _PID=18570

#to read the log, use journalctl
journalctl -u nginx

#chcek if you can start nginx from command line
/usr/bin/nginx -s start
The 'nginx-passenger' package in the AUR has what you're looking for. https://aur.archlinux.org/packages/nginx-passenger/

You can install it with your favorite AUR helper, e.g.,
$ yaourt -S nginx-passenger

Once you've installed this package, nginx needs to be configured to enable passenger. Here's an example of /etc/nginx/nginx.conf:

http {
passenger_root /usr/lib/passenger;
passenger_ruby /usr/bin/ruby;

server {
listen 80;
server_name www.example.com;
root /srv/http/example/public; # passenger_enabled on;


(Full disclosure: I maintain this AUR package)
You can find a better-looking readme here:
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!