finding out where to modify virtual host settings in rails, passenger, apache setup

Hey all,

I have a domain, let's say:

dev.mysite.com

And I want it to listen on port 3000:

dev.mysite.com:3000

Now this is on a remote webserver (not my local apache setup).

I have access to the server (which is apache and it's running on ubuntu os).

This server is a rails application in it and I want the rails application to run when the dev.mysite.com:3000 gets response on the web.

Everything is setup, such as apache, passenger, rails, ruby, ruby gems, etc. SOmeone set it all up. Now I am just trying to find the virtual host file so I can set up that domain address to be listening on port 3000. However, when I run the unix locate command, I get tons of files like httpd.conf:

/etc/apache2/httpd.conf /etc/phpmyadmin/lighttpd.conf /home/username/.rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/test/ stub/apache2/httpd.conf.erb /home/username/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/test/cgi/ lighttpd.conf /home/username/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.3/test/cgi/ lighttpd.conf /home/username/.rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.4/test/cgi/ lighttpd.conf /home/username/src/otp_src_R13B04/lib/inets/examples/server_root/conf/ httpd.conf /usr/local/lib/erlang/lib/inets-5.3/examples/server_root/conf/ httpd.conf /usr/local/rvm/gems/ruby-1.9.2-p180/gems/mongrel-1.1.5/examples/ httpd.conf /usr/local/rvm/gems/ruby-1.9.2-p180/gems/passenger-3.0.7/test/stub/ apache2/httpd.conf.erb /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.2/test/cgi/ lighttpd.conf /usr/local/rvm/gems/ruby-1.9.2-p180/gems/rack-1.2.3/test/cgi/ lighttpd.conf /var/lib/gems/1.8/gems/rack-1.2.2/test/cgi/lighttpd.conf /var/lib/passenger-standalone/3.0.7-x86_64-ruby1.9.2-linux- gcc4.4.5-1002/support/test/stub/apache2/httpd.conf.erb

My instinct said that the configuration setup would be in /etc/apache2/ httpd.conf but I went there and that file was empty.

Can anyone advise me which of these files might possibly have the virtual settings I need to modify in order to get dev.mysite.com to listen on port 3000 so that when I type in www.mysite.com:3000 in web address bar, it will respond and load the rails app.

thanks for response

I read this article:

And it says that:

"Passenger doesn’t even require virtual hosts to configure themselves as Rails applications. It will automatically detect a Rails application"

So maybe that's why I could not find a virtual host configuration for "dev.mysite.com"

If that's the case, then how do I make it listen to port 3000, because right now it sure isn't listening to port 3000.

Do I need to somehow overwrite the defaults in apache2.conf?

thanks for response

Perhaps someone more familiar with Ubuntu/Debian packaging can help more, but -- there has to be something starting httpd. I'd look in /etc/init.d/ for a startup script, which almost certainly will reference the config files.

Or use `ps` to see if the process shows how it was started.

Good luck,

I read that a little differently. To me it said that VirtualHosts don't need to indicate that it's Rails app, but there still is a DocumentRoot defined.

I think I'd start with this file.. but as Hassan said, you can probably look in /etc/init.d to see if it's being started from there, and use 'ps' otherwise.

I would take a look in /etc/apache2/sites-available for your virtual host configuration.� http.conf is not really used in the configuration you have.

    Norm