https://bz.apache.org/bugzilla/show_bug.cgi?id=64910

--- Comment #3 from Romain Lapoux <ma...@manusfreedom.com> ---
Sorry, I found the problem after a full Apache Dump and analyze/test of it.
It's a problem with a RewriteRule.
Consider the following config:
############ vHost content
<VirtualHost *:443>
  SuexecUserGroup "#1041" "#1030"
  ServerName mydomain.com
  ServerAlias www.mydomain.com
  ErrorLog /var/log/virtualmin/mydomain.com_error_log
  CustomLog /var/log/virtualmin/mydomain.com_access_log combined
  DocumentRoot "/home/mydomain.com/public_html"
  ScriptAlias "/cgi-bin/" "/home/mydomain.com/cgi-bin/"
  DirectoryIndex index.php index.html index.htm index.php4 index.php5
  SetEnvIf X-Forwarded-Proto https HTTPS=on
  <Directory "/home/mydomain.com/public_html/.well-known">
    AuthType None
    allow from all
    Require all granted
    Satisfy any
  </Directory>
  <LocationMatch "mytest">
    Header always set AAA-Test "helloMyTest"
  </LocationMatch>
  <LocationMatch "/tmp/.*">
    Header always set AAA-Test "helloTmp"
  </LocationMatch>
  <LocationMatch "/tmp5/.*">
    Header always set AAA-Test "helloTmp5"
  </LocationMatch>
  <Directory /home/mydomain.com/public_html>
    Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
    allow from all
    Require all granted
    RewriteRule .* /home/mydomain.com/public_html/index.php [L]
  </Directory>
  RewriteEngine on
  SSLEngine on
  SSLCertificateFile /home/mydomain.com/ssl.cert
  SSLCertificateKeyFile /home/mydomain.com/ssl.key
  SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
  ScriptAlias /awstats/ /home/mydomain.com/cgi-bin/
  <Files awstats.pl>
    AuthName "mydomain.com statistics"
    AuthType Basic
    AuthUserFile /home/mydomain.com/.awstats-htpasswd
    Require valid-user
  </Files>
  SSLCACertificateFile /home/mydomain.com/ssl.ca
</VirtualHost>
############
/home/mydomain.com/public_html/ is empty.

With this config, headers are never set, but if we move `RewriteRule .*
/home/mydomain.com/public_html/index.php [L]` outside the
`<Directory></Directory>` directive, header are correclty set.

So we are unable to use Location* and Header if this RewriteRule is set in a
Directory directive.
And to finish no problem if we set this directive in .htaccess of the same
directory:
############ .htaccess content
RewriteEngine on
RewriteRule .* /home/rlx-tech.fr/public_html/index.php [L]
############

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscr...@httpd.apache.org
For additional commands, e-mail: bugs-h...@httpd.apache.org

Reply via email to