
Comments:
Disabled
As I recently came across this challenge I found that its pretty dificult to host both Java and PHP or HTML in the same directory. While fighting with apache and tomcat trying to get this to work, I came across the apache proxy_ajp module. This acts as a tomcat connector for apache. Normally you would have your java content stored in domain.tld/somepath/ or domain.tld:8080/somepath Obviously this poses a problem depending on how your site is setup and is less than ideal in some situations.
Now going back to the apache module. This comes in handy when mixing site content because when you combine this and mod_rewrite you get a handy solution. So you may be asking yourself what is the solution? 1. create an .htaccess file in your document root
2. add the following code to the .htaccess, edit the code to fit your needs..
RewriteEngine on
RewriteRule /*.jsp ajp://localhost:8009/yourpath/%{REQUEST_URI} [P]
And thats it.. mod rewrite will take care of the Java requests by sending them to tomcat, and apache will handle the rest.
As a side note, if your main site content is java you may want to add an index type in your httpd.conf to reflect index.jsp, just make sure to restart apache before expecting it to work.
Comments:
Disabled
It seems the date command has documentation spread all over the internet and it can sometimes be a pain to sift through it.. so here you go. the easiest way to change the date and timezone is as follows..
[root@host ~]# date --set 11:31
[root@host ~]# cp /etc/localtime /etc/localtime.bak
[root@host ~]# rm -f /etc/localtime
[root@host ~]# ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
[root@host ~]# date
Mon Mar 23 11:33:33 CDT 2009
[root@host ~]#
This is a very basic example, and in most cases its best to sync to an NTP server, but this will help provide a base understanding.