h/t Mathew Olsen
I’m reposting this question here, I’m missing something. My basic authentication works for requests not getting sent to tomcat, but not working for ColdFusion pages.
What Tomcat / Lucee config file do I need to modify to either use the apache basic authentication on setup additional basic authentication?
I’m running Apache/2.4.10 (Debian) Here’s my site config file:
<VirtualHost *:80>
ServerName dev.mysite.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/mysite.com/dev/docroot
<Directory /var/www/mysite.com/dev>
Options Indexes FollowSymLinks
AllowOverride All
AuthName "Secured Development Environment"
AuthType Basic
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
DirectoryIndex index.cfm index.html
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Here’s what Lucee Added to my apache2.conf file
<IfModule mod_proxy.c>
ProxyPreserveHost On
ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2
ProxyPassMatch ^/(.+\.cfchart)(/.*)?$ http://127.0.0.1:8888/$1$2
ProxyPassMatch ^/(.+\.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2
# optional mappings
#ProxyPassMatch ^/flex2gateway/(.*)$ http://127.0.0.1:8888/flex2gateway/$1
#ProxyPassMatch ^/messagebroker/(.*)$ http://127.0.0.1:8888/messagebroker/$1
#ProxyPassMatch ^/flashservices/gateway(.*)$ http://127.0.0.1:8888/flashservices/gateway$1
#ProxyPassMatch ^/openamf/gateway/(.*)$ http://127.0.0.1:8888/openamf/gateway/$1
#ProxyPassMatch ^/rest/(.*)$ http://127.0.0.1:8888/rest/$1
ProxyPassReverse / http://127.0.0.1:8888/
</IfModule>