Do you mean that you want your Tomcat to be permanently connected to the Internet, with a fixed address? If so the first question is - what is your present Internet connection? That is - what kind of connection is it? Bill
To get a fixed IP address you have to go through your ISP and usually costs quite a bit. You can look into 'dynamic dns', that is probably a better solution for you. Usually if you are going to set up a site you would want to leave your system running 24/7 so people can actually see it when they want to. You will probably want to register a domain name, I got mine at godaddy DOT com.
The only thing I don't know how to do is tell my registrar (godaddy in my case) to point my www address to my IP address. I would imagine they have something setup, and this is something I have been planning, but I haven't gotten to that point yet so I haven't looked it up.
You might want to change the port to 80 so your users don't have to type a port number every time.
TOMCAT_HOME/conf/server.xml (search for 8080)
Joined: Jan 29, 2005
How can I restrict clients so they could access only certain directories in my computer. Say TOMCAT_HOME/webapps/mydomain/.
Could someone harm my computer if I let them upload only *.doc files? [ February 07, 2005: Message edited by: Joseph Sweet ]
Joined: Dec 29, 2004
You need to be very careful if you are going to allow file upload. A doc file can do just about anything it want's to your system if you open it and allow macros to run.
Exposing your system to the web and running a web server automatically puts you at some risk. You absolutly must have a firewall up (zone alarm), and an antivirus running (AGV is my personal favorite). I would tend to want to have the 'web server' a seperate machine. If that is not possible you will want to get a book on Tomcat security. To my understanding the default security on a Tomcat install is fairly secure, but I'm always a little paranoid about exposing my system.
Joined: Jan 29, 2005
Thank you for your reply.
I think letting other people upload doc files to my computer is the safest part as I am not going to open them. I have built an automatic resume' mailiing system (so I let them upload their resume) and thought to host it on my pc as I do not have a Java hosting account.
But since this is my only pc and do not want it to crush...
Does any one know of a Java hosting service that offers all the good Java stuff, and is affordable too?
Author and all-around good cowpoke
Joined: Mar 22, 2000
One of the security things to watch out for - the default web.xml probably has the init-param "listings" setting for the default servlet set to "true". This lets people browse directories - set it to false. Bill
As far as setting up a webserver, I would recommend that you buy a second hand PC to use only as your server. Also it makes life so much more easier if you obtain a static IP address from IP provider. They are usually less than $18 dollars a month. That way if your IP address ever changes you want have to keep changing your registration information on your domain name.
But I found this website very helpful, when I started to build my first webserver. It should answer just about all of your questions on what you might need and what to look for if you decide to host your own website.