I have apache in an interface that redirects a request using a rewrite rule. I have to put basic authentication before redirecting the request, so I put this in the configuration file:
<VirtualHost *:443> ServerAdmin xxxxxx DocumentRoot /var/www/html/ ServerName xxxxxxx RewriteEngine on ErrorLog logs/error.log CustomLog logs/access_log common <Directory /var/www/html/> AuthType Basic AuthName "Restricted Files" AuthUserFile /etc/httpd/conf/tag.pwd Require valid-user RewriteRule ^/(.*) http://xxxxxx:xxx/$1 [P,L] </Directory> </VirtualHost>
But does not work.
Any suggestions?
apache mod-rewrite basic-authentication
pyro
source share