In order to pass traffic to JBoss/TomCat on port 80 using Apache we used to install and configure mod_jk
.
Is there an equivalent for nginx? Basically want all port 80 traffic to be passed to jboss.
I'm running Tomcat using the tomcat6 package from Ubuntu 9.04, which makes a daemon out of Tomcat using jsvc. I'd like to know the proper way to set Java heap options like -Xmx
for Tomcat. I'd like to put the configuration wherever is most stylistically correct, and wherever is least likely to be overwritten by Ubuntu package updates.
The options I see right now:
/etc/init.d/tomcat6
./usr/share/tomcat6/bin/catalina.sh
./usr/share/tomcat6/bin/startup.sh
to set CATALINA_OPTS to have the desired flags, and then export CATALINA_OPTS as an environment variable. (This looks like it will get picked up by catalina.sh
.)The last option sounds like the best one, and it's advocated (without explanation of why) at Increasing Java's heapspace in Tomcat startup script. But I wanted to get a second opinion. Anyone want to confirm that there isn't a better way?
I installed Tomcat6 on a Ubuntu 9.04 server using apt-get install tomcat6. I uploaded a WAR using the manager interface and tried to start the application but get a pretty generic error on the Web interface saying it couldn't be started.
I am trying to find the logs to determine why my war won't start (I suspect low memory as i'm on a small VPS) but I don't know where they are.
/var/lib/tomcat6/logs is empty. My Tomcat splash page reliably informs me of the following;
Tomcat is installed with CATALINA_HOME in /usr/share/tomcat6
CATALINA_BASE in /var/lib/tomcat6,
following the rules from /usr/share/doc/tomcat6-common/RUNNING.txt.gz.
UPDATE
I tried running;
$ ps -ax
/usr/bin/jsvc -user tomcat6 -cp /usr/share/java/commons-daemon.jar:/usr/share/tomcat6/bin/bootstrap.jar -outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
But there is nothing in /var/log/syslog
Also runing
$ losof -p PID
didn't show any log files...
$ for PID in $(pgrep jsvc);do sudo ls -l /proc/$PID/fd|grep ' 1 -> ';done
l-wx------ 1 root 500 64 2010-03-30 13:29 1 -> pipe:[301470406]
lrwx------ 1 root 500 64 2010-03-30 13:29 1 -> /dev/null
l-wx------ 1 root root 64 2010-03-30 13:29 1 -> pipe:[301470406]
Thanks,
Gav
And is it configurable? Can I set up Tomcat so that a URL with, say, 200K of query params goes through successfully to the contained servlet?
Yes, I know one should use POST when you have lots of data; that's a less pleasant option in this particular case. The contained application (a search engine) expects a GET request to perform a search.
How do I prevent tomcat from caching? I have css and basic html files that I load and use via ajax, and unless I restart tomcat, the changes do not seem to reflect. Different machines, different browsers, and I don't receive the updated files.
Thoughts?