On 29.03.2013 00:24, Chris Arnold wrote: > Apache Tomcat/7.0.30 on SLES11 SP2. I am trying to configure access to a > webapp using http://share.domain.com. This webapp uses port 8080 and works > fine from inside the LAN. However, we have an apache2 server acting as a > proxy and we want users to not have to type in a port number. > > Now when accessing http://share.domain.com, the result is directories and > files are listed, the jsp files are not running. Here is my complete setup: > > jk.conf- > > # simple configuration for apache (for AJP connector, modul mod_jk.so) > > <IfModule mod_jk.c> > > JkWorkersFile /opt/alfresco/tomcat/workers.properties > JkLogFile /var/log/alfresco/mod_jk.log > JkShmFile /var/log/alfresco/shm > > # Log level to be used by mod_jk > JkLogLevel error > > # The following line mounts all JSP files and the /servlet/ uri to tomcat > #JkMount /servlets-examples/servlet/* ajp13 > JkMount /share/*.jsp ajp13
Note that you only forward JSP-Requests here. might be OK, depending on the application. > </IfModule> > > > virtualhost- > > <VirtualHost *:80> > ServerName share.domain.com > > #RewriteEngine On > #RewriteCond %{REQUEST_URI} !^/share/ > #RewriteCond %{HTTPS} on > #RewriteRule ^/. http://share.paradixent.com/share/ [P] > #JkMount /share/* worker1 Although the proxy rewrite rules are commented out here, later down the log indicates you are still somewhere using mod_proxy instead of mod_jk. > <IfModule mod_jk.c> > > > # The following line makes apache aware of the location of > # the /jsp-examples context > Alias /share "/opt/alfresco/tomcat/webapps/share" > <Directory "/opt/alfresco/tomcat/webapps/share"> > Options Indexes FollowSymLinks > allow from all > </Directory> You can let Apache serve static content directly from an exploded webapp, but it is generally not recommended, because you then also open up stuff that's not expected to be made public to requests from outside. If below "share" there's anything that's not meant to be served by Apache, then it would be beter to copy the stuff that Apache should serve to a separate directory, which would then be the one to put into the Alias. > # The following line mounts all JSP files and the /servlet/ uri to tomcat > #JkMount /servlets-examples/servlet/* ajp13 > JkMount /share/*.jsp ajp13 > > # The following line prohibits users from directly accessing WEB-INF > <Location "/share/WEB-INF/"> > #AllowOverride None > deny from all > </Location> That's one exampe for stuff you don't want to be served, META-INF as well (if existing), there could be other stuff as well. > # if not specified, the global error log is used > ErrorLog /var/log/apache2domain.com-error_log > CustomLog /var/log/apache2/domain.com-access_log combined > > </IfModule> > > </VirtualHost> > > > httpd.conf- > > # mod_jk > Include /opt/alfresco/tomcat/conf/jk.conf > > > Mod_jk is loaded: > > web:~ # /usr/sbin/httpd2 -M > Loaded Modules: > ....... > jk_module (shared) > perl_module (shared) > php5_module (shared) > Syntax OK > > > > > Here is the log from apache: > > [Thu Mar 28 18:40:14 2013] [error] [client pub ip] proxy: Error reading from > remote server returned by /error/HTTP_INTERNAL_SERVER_ERROR.html.var > [Thu Mar 28 18:40:28 2013] [error] [client pub ip] (70007)The timeout > specified has expired: proxy: error reading status line from remote server > share.paradixent.com > [Thu Mar 28 18:40:28 2013] [error] [client pub ip] proxy: Error reading from > remote server returned by /error/HTTP_INTERNAL_SERVER_ERROR.html.var What's the request you send? What's the expected response and what's the actual response? The above log snippet tells us that somewhere in your config you have mod_proxy active, which is an alternative way to connect to a backend. You should get your idea straight, for which URLs you are using mod_proxy and for which mod_jk. I would suggest to stick with one. You didn't show us your worker.properties file. You didn't show us your mod_jk log file. Regards, Rainer --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org