Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Which distro are you running? What is the application's name? – quanta Aug 30 '12 at 16:34
The application is a custom app written by another team. And, how do I find out what distro is the server using? (The server has been setup by the server team and I am trying to figure this application so I cas start making some customizations) – Helius 06 Aug 30 '12 at 16:37
cat /etc/issue? – quanta Aug 30 '12 at 16:38
CentOS release 6.3 (Final) Kernel – Helius 06 Aug 30 '12 at 16:40
grep -lir <> /etc/httpd? – quanta Aug 30 '12 at 16:42
up vote 0 down vote accepted

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 {
            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

share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.