Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Oct 14, 2013 3:23 am 
Offline
Senior Newbie

Joined: Sat Apr 07, 2012 3:17 am
Posts: 6
Location: India
Hi All,

Here is the problem description:-

I am using Linode VPS services for hosting our two web applications. These applications are deployed in tomcat. But when I am typing domain name in the browser, the tomcat default page(It works!) is showing every time.

The technology stack includes Apache, mod_jk and Tomcat. I have done the required configuration but seems missing something somewhere.

Can any please help me to solve this problem.

Following is the virtual host entry for one of the domain names

<VirtualHost *:80>
JkMount /* default
ServerAdmin admin@domain1.com
ServerName domain1.com
ServerAlias domain1.com
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(?<!www\.)([a-z]+\.com)$ [NC]
RewriteRule /(.*) http://www.%1/$1 [R=permanent,L]
DocumentRoot /var/lib/tomcat6/webapps/Domain1App/
ErrorLog /var/www/vhosts/domain1.com/logs/error.log
CustomLog /var/www/vhosts/domain1.com/logs/access.log combined


</VirtualHost>


Thanks,
Vikram

_________________
Regards,
Vikram


Top
   
PostPosted: Mon Oct 14, 2013 3:38 am 
Offline
Senior Member

Joined: Sun Apr 26, 2009 3:37 am
Posts: 72
Website: http://wiggenhorn.org/
Your virtual host definition only works for domain1.com and not for www.domain1.com, so if you're typing www.domain1.com into your browser, your virtual host definition would not be used by Apache. Fix up your ServerAlias line.


Top
   
PostPosted: Mon Oct 14, 2013 3:54 am 
Offline
Senior Newbie

Joined: Sat Apr 07, 2012 3:17 am
Posts: 6
Location: India
Thanks for the reply . Can you please provide input on what should be the entry against ServerAlias .

I have tried with following entries and restarted Apached but still no luck

ServerName domain1.com
ServerAlias www.domain1.com

_________________
Regards,

Vikram


Top
   
PostPosted: Mon Oct 14, 2013 9:40 am 
Offline
Senior Member

Joined: Mon Jan 02, 2012 12:45 pm
Posts: 365
ServerAlias www.domain1.com


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group