Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 <your.app.name> /etc/httpd? –  quanta Aug 30 '12 at 16:42

2 Answers 2

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

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

 
discard

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.