Thursday, December 02, 2004

Setting up java tomcat on linux V - Configure APACHE non-ssl

Configure APACHE/NON-SSL

  • md /www
  • md /www/hosts
  • md /www/hosts/nonsecure
  • md /www/hosts/nonsecure/www.mydomain.com
  • md /www/hosts/nonsecure/www.mydomain.com/docs
  • md /www/hosts/cgi-bin
  • md /www/hosts/cgi-bin/www.mydomain.com
  • md /www/hosts/cgi-bin/www.mydomain.com/cgi-bin

#Make sure you have VirtualHost like this

NameVirtualHost 192.168.2.101


<VirtualHost *:80>
ServerName www.mydomain.com
ServerAdmin webmaster@www.mydomain.com
DocumentRoot /www/hosts/nonsecure/www.mydomain.com/docs
ErrorLog logs/www.mydomain.com_public-err_log
CustomLog logs/www.mydomain.com_public-access_log common
ScriptAlias /cgi-bin/ /www/hosts/cgi-bin/www.mydomain.com/cgi-bin


# Static files
Alias /mywebapp "/usr/local/tomcat/webapps/mywebapp" <


Directory "/usr/local/tomcat/webapps/mywebapp">
Options Indexes FollowSymLinks
DirectoryIndex index.jsp
</Directory>


#Deny direct access to WEB-INF and META-INF
<Location "/mywebapp/WEB-INF/*">
Allowoverride None
deny from all
</Location>


<Location "/mywebpp/META-iNF/*">
AllowOverride None
deny from all
</Location>

JkMount /mywebapp_nonsecure/*.do ajp13
JkMount /mywebapp_nonsecure/*.jsp ajp13
JkMount /mywebapp_nonsecure ajp13
JkMount /mywebapp_nonsecure/* ajp13
</VirtualHost>

JkWorkersFile "/usr/local/tomcat/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat/logs/mod_jk.log"

No comments:

Post a Comment