Configure Apache Web server

Till now we were doing quite well using Apache Tomcat to serve our applications. Maybe the trouble was made by WPS not supporting .pdf files download, and maybe we would like to show our work to the rest of the world.  People are just not used to add port to URL or to append particular application name as subfolder instead of writing one would write down only and would be redirected to the right place. We can sort that out using Apache.

Proper Apache config would look like this:

cat /etc/httpd/conf/httpd.conf
NameVirtualHost *:80

<VirtualHost *:80>

 RewriteEngine on
 RewriteCond %{REQUEST_URI} ^/$
 RewriteRule (.*) /DigMap/ [R=301]

 ProxyRequests Off
 ProxyPreserveHost On
 <Proxy *>
 Order deny,allow
 Allow from all
 ProxyPass / ajp://localhost:8009/
 ProxyPassReverse / ajp://localhost/

<VirtualHost *:80>
 DocumentRoot /var/www/html/digmap

Restart Apache to apply changes

sudo service httpd restart

We assume to have folder that will share files:

su -
mkdir -p /var/www/html/digmap
chown -fR tomcat:apache /var/www/html/digmap
chmod ug+rw /var/www/html/digmap

Setting up DNS records

Add two new A records to DNS register:  A  A

I would recommend to use simple for managing DMS record. Just for info, all physical and legal persons in Republic of Croatia have a right for their free domain like: or!

check out does it work properly:



Non-authoritative answer:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s