Category Archives: Apache Tomcat

About Apache Tomcat

Default root directory in Apache Tomcat is:
%CATALINA_HOME%\webapps\ROOT

e.x. C:\apache-tomcat-7.0.42\webapps\ROOT

Advertisements

How to customize default Tomcat port

By default Apache Tomcat listens on port 8080 but we might want to change this port:

  1. Find your Apache Tomcat installation folder
  2. Navigate to conf folder
  3. Open server.xml file
  4. Find the following lines:
    <Connector port="8080" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" />
  5. Change the connector port according to your preferences. In my case to port 80
    <Connector port="80" protocol="HTTP/1.1"
    connectionTimeout="20000"
    redirectPort="8443" />
  6. Save the file and exit
  7. Restart your server and you are ready to go

Apache share folder + Junction Link Magic

In order to create a new folder available on a web server running Apache tomcat.
First, you need to check the what is the default DocumentRoot value in
\Apache\conf\httpd.conf

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

Then, go to above folder and create a new directory in it.
once you open your web browser  you should be able to navigate to

http://localhost/newFolder

Now, to use Junction Link Magic to create a junction point.

And you can share all your data!