Thursday, July 31, 2008

Apache Basics

Apache Restart

sudo /etc/rc.d/init.d/httpd restart

All requests with port :8080 are caught by tomcat as apache is listening at port 80

requests without ports are heard by apache which listens at port 80 and later redirects through 8009

Directory Structure

etc/httpd/

conf/ conf.d/ logs/ modules/ run/

conf/
httpd.conf ssl.crl ssl.crt ssl.csr ssl.key ssl.prm workers.properties

conf.d/

authz_ldap.conf jk.conf perl.conf php.conf python.conf README ssl.conf webalizer.conf welcome.conf


1. etc/httpd/conf/httpd.conf

Attributes include
DocumentRoot "/home/partyaccount/website/htdocs"
DirectoryIndex index.jsp index.html inde
DefaultType text/plain
ErrorLog logs/error_log
AddEncoding x-compress Z
ErrorDocument 500 "The server made a boo boo."

2. worker/properties

worker.list=worker1
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
[uri:/ws/*]
worker=ajp13:localhost:80


3. etc/httpd/conf.d/jk.conf

worker assighnments with respective .jsp,.html etc


4. etc/httpd/conf.d/ssl.conf

will have virtual hosts configured here ex:pa112 etc
document root
server admin
servername

Rewrite rules per vhost klike
RewriteEngine on
RewriteRule ^(.*)/.jsp$ $1.do [L]

 
Free Domain Names @ .co.nr!