Ok.. that should work and provide a nice caching function. Most tomcat
people would say the most efficient design is to have tomcat by itself
listening on port 80. In Magnolia's case, the caching system in Squid
would probably provide a nice boost to performance. My site is fronted
by Apache Httpd and it's caching system takes a load off the Magnolia
system. Updates may not show immediately depending on how long it takes
Squid to check back with tomcat and find out if things have changed.
But if your site is like a lot of sites, it only changes a little each
day anyway.
Still ... definitely drop the GNU Java JVM -- it's not up to the task
of running a server environment. Alright for client applications, but I
wouldn't recommend it for a server.
jsvc is a little utility program that grabs the required privileged
ports, and then launches tomcat as process under the user account you
choose. That allows tomcat to get the low number ports and run as an
unprivileged user -- which makes admins like me really happy :-).
--David
Adrian Butnaru wrote:
Thanks,
I am trying to use Squid in front of Tomcat now. I will also try to
use Sun's Java. I thought it will be more straightforward to use
Tomcat as a webserver.
I am not very sure how to use jsvc. I will dig a little the try again
installing Magnolia inside.
David Smith schreef:
Sorry, I'm a little handicapped in languages outside of English..
Babelfish tells me the error is "Connection has been refused" in
Dutch. To connect to ports below 1024 in any of the *nix OS's
(Unlix/Linux/most outside of Windows), the user starting tomcat has
to be root or have root privilege on the system. That's usually
achieved using jsvc from the Apache Commons Daemon project
(http://commons.apache.org/daemon/) although I'm sure you can find
other ways with a little googling.
Other than that, I would highly recommend you replace your GNU Java
environment with a more server strength Java like the one from Sun
(http://java.sun.com). Your hosting provided should be able to help
with that.
--David
Adrian Butnaru wrote:
Thanks for the tips and comments.
I think is something wrong with my Tomcat.
Please help me if more experienced.
Verbinding is geveigerd = Access is denied.
Have you any ideea why?
This is my log catalina.out:
Using CATALINA_BASE: /usr/share/tomcat5
Using CATALINA_HOME: /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
Created MBeanServer with ID:
-pitlki:fkcu3gdh.0:h1408713.stratoserver.net:1
26-aug-08 20:10:52 org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Verbinding is geweigerd
at gnu.java.net.PlainSocketImpl.connect(libgcj.so.7rh)
at java.net.Socket.connect(libgcj.so.7rh)
at java.net.Socket.connect(libgcj.so.7rh)
at java.net.Socket.<init>(libgcj.so.7rh)
at java.net.Socket.<init>(libgcj.so.7rh)
at
org.apache.catalina.startup.Catalina.stopServer(catalina-5.5.23.jar.so)
at java.lang.reflect.Method.invoke(libgcj.so.7rh)
at org.apache.catalina.startup.Bootstrap.stopServer(bootstrap.jar.so)
at org.apache.catalina.startup.Bootstrap.main(bootstrap.jar.so)
Using CATALINA_BASE: /usr/share/tomcat5
Using CATALINA_HOME: /usr/share/tomcat5
Using CATALINA_TMPDIR: /usr/share/tomcat5/temp
Using JRE_HOME:
touch: kan touch `/usr/share/tomcat5/logs/catalina.out' niet
uitvoeren: Toegang geweigerd
/usr/bin/dtomcat5: line 325: /usr/share/tomcat5/logs/catalina.out:
Toegang geweigerd
David Smith schreef:
Hi Adrian.
2. Changed <Engine name="Catalina" defaultHost="localhost">
to
<Engine name="Catalina" defaultHost="www.mywebsite.info">
Not really necessary ... not wrong, just not necessary. Localhost,
which was declared as the default host in the Host element above
and would have naturally taken any request without an explicitly
matching Host element.
3. Changed <Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
to
<Host name="www.mywebsite.info" appBase="webapps/magnoliaPublic"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
Again, not necessary .... not wrong ... just unnecessary. See above.
The name of the folder containing the application is magnoliaPublic
Then you should be requesting
http://www.mywebsite.info/magnoliaPublic. If you want
magnoliaPublic to be the default webapp, it should be named ROOT
(case is important).
Your result (the blank page) may be because their is no ROOT webapp
or because of an exception processing the default page. Hard to
say what's happening at this point. You should review your logs,
both tomcat's and magnolia's for possible sources of issues. Also
check to be sure tomcat is listening on port 80 as that's the
default port web browsers contact when you don't add a colon and
port number after your domain name in the URL.
--David
Adrian Butnaru wrote:
But is there any chance to make it working only woth Tomcat?
I really do not need Apache.
Adrian
Ruben Reusser schreef:
you probably would be better off installing apache in front of
tomcat and use a reverse proxy or mod_jk
Ruben
Adrian Butnaru wrote:
Hi I am a newbie trying to use Tomcat to run a website (e.g
www.mywebsite.info) on a Virtual Private Server (VPS). I built
the website using Magnolia CMS. My domain is registered by the
provider of the VPS. I uploaded my application in the webapps
folder. The name of the folder containing the application is
magnoliaPublic. I did the following changes in server.xml:
1. Changed the Connector port from 8080 to 80.
2. Changed <Engine name="Catalina" defaultHost="localhost">
to
<Engine name="Catalina" defaultHost="www.mywebsite.info">
3. Changed <Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
to
<Host name="www.mywebsite.info" appBase="webapps/magnoliaPublic"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">
If I try www.mywebsite.info in my browser I cannot see nothing.
Can you please guide how to make my website working? Is it
something more I should do?
Thanks
A.
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------