apache vhost setup
My apache2ctl -S shows:
is a NameVirtualHost
default server mtzion.mtzionchinagrove.com (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost mtzion.mtzionchinagrove.com (/etc/apache2/sites-enabled/000-default:1)
port 80 namevhost mtzionchinagrove.com (/etc/apache2/sites-enabled/mtzion:1)
port 80 namevhost onebody.com (/etc/apache2/sites-enabled/onebody:1)
Syntax OK
my sites enabled directory has in 000-default
DocumentRoot /var/www/apps/
AllowOverride None
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/error.log
Possible values include: debug, info, notice, warn, error, crit,
in my first vhost called onebody:
ServerAlias
DocumentRoot /var/www/apps/onebody/current/public
In my other vhost called mtzion:
ServerAlias
DocumentRoot /var/www/mtzion
This was working before I added the second vhost
What Am I doing wrong?
Tom
8 Replies
I am trying to set up two rails apps on my Ubuntu 10.04 node. I want to be able to access them as
I ma using apache2 both apps are installed in the /var/www/apps/ directory as mtzion and onebody respectively. I had the onebody app working previously so I know it works. Apache starts with no error messages and when I type in the IP I get Index of / and a listing showing the two subdirectories mtzion and onebody.
my hostname is mtzion
I set my etc/hosts
127.0.0.1 localhost.localdomain localhost
66.228.62.247
66.228.62.247
My config ports has
NameVirtualHost *:80
Listen 80
My default virtualhost is
DocumentRoot /var/www/apps/
AllowOverride None
AllowOverride None
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
My mtzion virtual host is
ServerAlias
DocumentRoot /var/www/apps/mtzion/public
Options -MultiViews
my onebody virtualhost is
ServerAlias
DocumentRoot /var/www/apps/onebody/current/public
I do not know what relevant logs I should be checking and I am not sure which way to turn to debug this I feel fairly confident about my rails apps and the onebody app worked fine before I started messing with virtual hosts
This may not be the right forum for this but I thought I would give it a try
Tom
checked mtzion and onebody logs (for the rails apps not the apache log)
mtzion has nothing
one body
has the following before I made changes
Started GET "/messages/new?topersonid=1" for 71.71.240.244 at Tue Jun 07 22:47:39 -0400 2011
Processing by MessagesController#new as HTML
Parameters: {"topersonid"=>"1"}
Rendered messages/_form.html.erb (3.1ms)
Rendered messages/formwith_preview.erb (5.8ms)
Rendered people/_menus.erb (7.6ms)
Rendered messages/new.html.erb within layouts/default (34.3ms)
Completed 200 OK in 49ms (Views: 40.8ms | ActiveRecord: 1.4ms)
Started GET "/style.css?13072175635ab3c5fa6900003333e4e4e4" for 71.71.240.244 at Tue Jun 07 22:47:39 -0400 2011
Processing by StylesController#show as CSS
Parameters: {"13072175635ab3c5fa6900003333e4e4e4"=>nil}
Read fragment views/style?id=1.css (0.7ms)
Completed 200 OK in 5ms
After changes
Started GET "/admin/phpmyadmin/scripts/setup.php" for 72.167.41.215 at Wed Jun 08 06:21:36 -0400 2011
ActionController::RoutingError (No route matches "/admin/phpmyadmin/scripts/setup.php"):
I'm not sure what this means