Strange config issue

I’m using Virtualmin and thought I had things working fine until I put the website up.

I have a folder in webapps / thedomain.com / index.cfm – Hello World.

If I go to http://thedomain.com I get “Hello World”. All good.

However if I go to http://thedomain.com/index.cfm it defaults to webapps / root / index.cfm. This mean if I add any extension to the domain name the folder thedomain.com is not recognised. Any ideas please.

Here are the additions to Virtualhost in httpd.conf.

Update VirtualHost ipaddress:80>

DocumentRoot /opt/lucee/tomcat/webapps/thedomain.com

DirectoryIndex index.cfm index.html index.htm index.php index.php4 index.php5
<Directory /opt/lucee/tomcat/webapps/thedomain.com>

<Directory /opt/lucee/tomcat/webapps/thedomain.com/cgi-bin>

#Added this above

RewriteEngine On
RewriteRule ^/lucee/admin/(.*) http://thedomain.com [R]

 ProxyRequests Off
 
<Proxy *>
  		Order deny,allow
  		Allow from all
 	</Proxy>

  ProxyPass / http://127.0.0.1:8888/ thedomain.com/
  ProxyPassReverse / http://127.0.0.1:8888/thedomain.com/

All good. Sorted it

Actually it was a bit of a work around. I’m sure there’s a better solution. I put a cflocation in the webapps/domain.com/index.cfm so when people put http://domain.com the cflocation sent it to http://domain.com/index.cfm which pointed to home/domain.com/index.cfm where I put the website files.

If you can thing of a better solution please let me know