1

I have inherited a ruby application at work and I am fairly new to ruby hosting environments. The application is hosted on a linux server but I am unable to find where the webroot is.

I have looked for /var/www which is the webroot for apache on linux for other applications I have been working with. But that location doesn't exist on this server.

I was looking through the folders on the server and got a feeling that it might be using Nginx+passenger. Could someone point me in the right direction where to look? Any help is greatly appreciated.

Helius 06
  • 13
  • 3

2 Answers2

0

Enter nginx -V to find out if nginx is installed and where the web root is. The configuration for nginx is normally located at /etc/nginx but the command will tell you.

If you have another webserver installed (e.g. nginx -V returns command not found) the process is different.

Fleshgrinder
  • 3,798
  • 2
  • 17
  • 20
0

if nginx was installed as a package, the config file will be probably located in /etc/nginx/nginx.conf, you might find the global server settings like this:

http {
    passenger_root /usr/share/phusion-passenger/source/bin/passenger;
    passenger_ruby /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby;

    server {
            listen 127.0.0.1:80;
            server_name localhost;

            root /var/www/localhost/htdocs;
    }
    include virtuals/*;
 }

If there is just one application it could be specified by the root tag /etc/nginx/nginx.conf. In case that you have there many applications, it's probably in virtuals folder (you should look for include). The name of the folder could be different, but it's something like sites-enabled in apache

Tombart
  • 2,143
  • 3
  • 27
  • 48