Question

I am not sure where this setting is. Currently my site redirects every non-www URL to www. I am using the Rubber gem to deploy to AWS which in turn uses Passenger, and I've seen some posts which suggest the configuration for this lies with Passenger. I am using Apache 2

Was it helpful?

Solution

This task is done by configure correctly the virtualhost of your server (not RoR or Passenger).

You should localize the host file on your webserver (apache, nginx,..) and put something like this:

<VirtualHost *:80>
    DocumentRoot /www/example1
    ServerName example.com

    # Other directives here
</VirtualHost>

Maybe this link can help you: http://httpd.apache.org/docs/trunk/vhosts/examples.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top