Author |
|
mesa57
Joined: 22 Nov 2013 Posts: 12 Location: Mijdrecht, Netherlands
|
Posted: Fri 22 Nov '13 21:25 Post subject: Apache 2.4 : rewrite does not work for one of my locations |
|
|
Hi all,
After a few years with apache 2.2 I decided to try apache 2.4
Both are running on windows 7.
I had to recompile my modules against the new api, but that was succesful.
I am now confronted that the rewrite rule for one of my locations :
Code: | RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/mijnvital(.*) https://%{SERVER_NAME}/mijnvital$1 [R,L] |
Code: | <Location /mijnvital>
Options Indexes FollowSymLinks MultiViews ExecCGI
SetHandler vl910-handler
# SSLRequireSSL
Require all granted
</location> |
Does not work anymore.
Apache is running with loglevel 6/8 for rewrite :
Code: | C:\Program Files (x86)\Apache Software Foundation\Apache24\bin>httpd
[Fri Nov 22 20:17:35.549179 2013] [core:trace3] [pid 1908:tid 728] core.c(3034):
Setting LogLevel for all modules to trace6
[Fri Nov 22 20:17:35.549179 2013] [core:trace3] [pid 1908:tid 728] core.c(3061):
Setting LogLevel for module mod_rewrite.c to trace8 |
However, I do not see anything in the error log :
http://pastebin.com/jhKHybgf
This is my complete .conf :
http://pastebin.com/QgnydHfF
Can anyone help me ? |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3093 Location: Hilversum, NL, EU
|
Posted: Fri 22 Nov '13 22:15 Post subject: |
|
|
What response does the client get ? 404 ?
Maybe the v1910 handler is causing it, see what you get when removing it. |
|
Back to top |
|
mesa57
Joined: 22 Nov 2013 Posts: 12 Location: Mijdrecht, Netherlands
|
Posted: Sat 23 Nov '13 8:19 Post subject: |
|
|
No, the response is just 200 and the webpage is displayed. But it is not redirected to https as was the goal of the rewrite.
I will try with the handler removed en report back to you. |
|
Back to top |
|
mesa57
Joined: 22 Nov 2013 Posts: 12 Location: Mijdrecht, Netherlands
|
Posted: Sat 23 Nov '13 9:54 Post subject: |
|
|
With the VL910 handler disabled, the same result. The webpage I have put in <documentroot>/mijnvital is displayed, but no redirection is done to https.
Btw., this worked fine under apache 2.2 |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Sat 23 Nov '13 11:46 Post subject: |
|
|
This works for me
RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule ^/mijnvital(.*) https://%{SERVER_NAME}/mijnvital$1 [L,R] |
|
Back to top |
|
mesa57
Joined: 22 Nov 2013 Posts: 12 Location: Mijdrecht, Netherlands
|
Posted: Sat 23 Nov '13 12:26 Post subject: |
|
|
Even that does not work. Strange thing is I see no log lines for any rewrite action. |
|
Back to top |
|
mesa57
Joined: 22 Nov 2013 Posts: 12 Location: Mijdrecht, Netherlands
|
Posted: Sat 23 Nov '13 21:06 Post subject: |
|
|
Now I am very puzzeled.
After adding options +followsymlinks :
Code: | Options +FollowSymLinks -MultiViews
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteRule ^/mijnvita(.*) https://%{SERVER_NAME}/mijnvita$1 [L,R] |
It works for http://mijnvita.nl/mijnvita
but not for http://www.mijnvita.nl/mijnvita
But still nothing in the log
(left out last letter in links) |
|
Back to top |
|
Steffen Moderator
Joined: 15 Oct 2005 Posts: 3093 Location: Hilversum, NL, EU
|
Posted: Sat 23 Nov '13 21:49 Post subject: |
|
|
2.4 : Mixing Options with a + or - with those without is not valid syntax.
Sorry I did not noticed it. |
|
Back to top |
|
mesa57
Joined: 22 Nov 2013 Posts: 12 Location: Mijdrecht, Netherlands
|
Posted: Sat 23 Nov '13 22:43 Post subject: |
|
|
Is the module maybe compiled with the -DREWRITELOG_DISABLED compiler option ? |
|
Back to top |
|
admin Site Admin
Joined: 15 Oct 2005 Posts: 685
|
Posted: Sat 23 Nov '13 23:19 Post subject: |
|
|
I assume you mean mod_rewrite. No |
|
Back to top |
|
mesa57
Joined: 22 Nov 2013 Posts: 12 Location: Mijdrecht, Netherlands
|
Posted: Sun 24 Nov '13 15:28 Post subject: |
|
|
It is a pitty I cannot get this working on apache 2.4
It is also a blocking issue which prevents me from upgrading from 2.2 to 2.4
I wanted to do this for tls v1.2 support, but I guess I have to wait for maybe a next release or so. |
|
Back to top |
|
mesa57
Joined: 22 Nov 2013 Posts: 12 Location: Mijdrecht, Netherlands
|
Posted: Sun 24 Nov '13 20:13 Post subject: |
|
|
Steffen, I finally got it working.
I do not know why exactly.
I compared my configurations :
http://pastebin.com/raw.php?i=4u995QuQ
Left one did not work, right one does
But of cause I am happy now ... |
|
Back to top |
|