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/