Answer the question
In order to leave comments, you need to log in
How to host multiple domains on one server?
On Ubuntu 12.04 openVZ VPS, Apache is installed, Passanger is installed in it, so that the Ruby site works. The site has several faces available (not yet) at different addresses. I create in /etc/apache2/sites-available
a file site1.com
. Having previously created an A record on the site1.com domain referring to the server ip. The content of the file is:
<VirtualHost *:80>
ServerName site1.com
DocumentRoot /home/happy_buddha/Sites/rubysite/public
<Directory /home/happy_buddha/Sites/rubysite/public>
AllowOverride all
Options -MultiViews
</Directory>
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
You also need to register alias in the Apache config, this is how I did it with redmine:
Alias /redmine "/usr/local/www/redmine/"
<Directory /usr/local/www/redmine>
PassengerAppRoot /usr/local/www/redmine
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
</Directory>
As far as I remember, the config name must end with conf. After you rename - a2ensite site1.com.conf
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question