Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 17324  / 1 Year ago, mon, january 9, 2023, 7:33:39

I went through a tutorial http://craiccomputing.blogspot.com/2010/10/passenger-3-nginx-and-rvm-on-mac-os-x.html and everything was ok. There were no errors.



Nginx with Passenger support was successfully installed.

The Nginx configuration file (/opt/nginx/conf/nginx.conf)
must contain the correct configuration options in order for Phusion Passenger
to function correctly.

This installer has already modified the configuration file for you! The
following configuration snippet was inserted:

http {
...
passenger_root /home/alex/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.14;
passenger_ruby /home/alex/.rvm/wrappers/ruby-1.9.3-p194/ruby;
...
}

After you start Nginx, you are ready to deploy any number of Ruby on Rails
applications on Nginx.


However I can't start it.



alex@ubuntu:~$ sh -x /etc/init.d/nginx start
sh: 0: Can't open /etc/init.d/nginx

sudo /etc/init.d/nginx start
sudo: /etc/init.d/nginx: command not found


The directory opt/nginx exists and there are files in it. Localhost:80 doesn't work either.



Any suggestions?


More From » nginx

 Answers
3

The normal way to install nginx is via apt-get (or Synaptic or SW Center) and that doesn't put anything in /opt, AFAIK. In that case, you can stop/start it by simply issuing:



sudo service nginx start|stop|restart (etc)


If your nginx installed itself in /opt, I doubt it would have touched the /etc/init.d directory...


[#36513] Wednesday, January 11, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
whipstder

Total Points: 189
Total Questions: 110
Total Answers: 99

Location: Uzbekistan
Member since Sat, Feb 27, 2021
3 Years ago
whipstder questions
Wed, Nov 9, 22, 09:45, 2 Years ago
Tue, Sep 14, 21, 10:54, 3 Years ago
Sun, May 28, 23, 03:52, 1 Year ago
Sat, Jul 17, 21, 07:10, 3 Years ago
;