So, I’ve got the publication server (“frank”) running through tomcat on port 8080. I’ve decided for several reasons to run apache2 as the front-end for our site on port 80 (and possibly 443 if we need SSL in the future).
The problem I’m having is that some pages are not being treated as html when viewed through the apache2 frontend (using firefox or chrome). I know this isn’t a forum for apache2, but I thought maybe someone here might have run into this problem before and would know how to deal with it.
For example, http://frank:8080/Academics/ (note the :8080, so this is going through tomcat) displays properly:
…but when I look at http://frank/Academics/ (note that this is using port 80, so it’s going through apache2) shows the text of the html:
Since it’s working fine through tomcat, I assume the problem is with my apache2 config.
Here’s jk.conf:
<ifmodule mod_jk.c>
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel error
</ifmodule>
here’s workers.properties:
workers.tomcat_home=/var/lib/tomcat6
workers.java.home=/usr/lib/jvm/java-6-sun
ps=/
worker.list=default
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1
worker.loadbalancer.type=lb
and here’s the config for my virtual host:
<virtualhost *:80>
JkMount /*.jsp default
ServerName frank.gsw.local
ServerAlias frank
ServerAdmin root@gsw.edu
DocumentRoot /opt/tomcat/gsw.eduapps/ROOT
ErrorLog /opt/tomcat/gsw.eduapps/logs/error.log
CustomLog /opt/tomcat/gsw.eduapps/logs/access.log common
<directory /opt/tomcat/gsw.eduapps/ROOT>
Options -Indexes
</directory>
DirectoryIndex index index.php index.html index.htm index.shtml
</virtualhost>
I think the problem might come from the fact that the individual pages don’t have an extension (like “index” instead of “index.html”), so apache sees the file as a text file and tells the browser to render it as standard text instead of html.