Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm running a few php sites off apache and want to start rails dev.

I've installed rvm/nginx and can get my ruby site by going to

How do I pass to

What's the best way for me to route a subdomain for ruby dev?? I'd switch to nginx completely if it weren't for all my php sites--seems like it's easier to just proxy for ruby.


My nginx config looks like this:

  listen 8000;
  root /home/me/sites/ruby_folder/public;

My apache config looks like this:

  ProxyPreserveHost on
  ProxyPass /
  ProxyPassReverse /
share|improve this question
Can you clarify what the issue is? You're preserving the host header from the client request. Is that not what you're seeing sent to nginx? – Shane Madden Mar 22 '12 at 2:50
I'm not sure if nginx is seeing anything, but I'm fairly certain that apache is seeing a request. I'm a noob... – Kevin Brown Mar 22 '12 at 3:10

1 Answer 1

up vote 0 down vote accepted

listen: 8000; is invalid syntax - it should be listen 8000;. Is nginx even starting successfully?

share|improve this answer
You're right. My typo... Nginx is starting correctly. – Kevin Brown Mar 22 '12 at 4:23
Ok - so can you clarify what your issue is? What happens when you attempt to access the site with a browser? – Shane Madden Mar 22 '12 at 5:08
You can see it now: works, but doesn't...I don't know why. I want the subdomain to point to the 8000 port, I think. – Kevin Brown Mar 22 '12 at 5:11
The DNS name does not resolve to an IP address. How is your DNS configured? – Shane Madden Mar 22 '12 at 5:14
Not sure. What do you need to know? – Kevin Brown Mar 22 '12 at 15:41

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.