[unclug] Redirect 80 ---> 443 with Apache?
John W. Sopko Jr.
sopko at cs.unc.edu
Fri Feb 20 09:56:16 EST 2004
I trid to re-order the flags on my own also, I just tried
your config and it did not help...<:-(
Jeff Bollinger wrote:
> John W. Sopko Jr. wrote:
>
>> Hey Jeff,
>>
>> I have been trying to get this to work.
>> I am doing some web server upgrades/configurations, I am looking at
>> upgrading our apache servers to redhat enterprise 3/apache 2.x.
>> I may need the port 80 -> 443 redirection for a project I am working on.
>>
>> I know I have gotten this mod_rewrite to work in the past on apache
>> 1.3 but cannot get it to work on a rhel3/apache 2.x server. You can
>> take a look at the following link and see the mode_rewrite is turned
>> on. I
>> configure a self-signed certificate on my ssl server so
>> https://lark.cs.unc.edu works. I cannot get any redirection to work
>> even if I do something simple like:
>>
>> RewriteRule ^/(.*) http://yahoo.com [L,R,NC]
>>
>> I turned on rewrite logging and it does not log anything. I opened up
>> server-info to .unc.edu so you should be able to see my config at:
>>
>> http://lark.cs.unc.edu/server-info#mod_rewrite.c
>>
>> Note I also see a problem with the server-info on rhel3/apache 2.x
>> where the core.c module does not fully list my configuration,
>> it cuts it off, but the mode_rewrite config is fully shown. Thanks
>> for any suggestions.
>>
>> http://lark.cs.unc.edu/server-info#core.c
>
>
> John, I'm not sure that it matters but I re-ordered the last bit of the
> RewriteRule to [NC,R,L]
>
> Other than that, I don't see what's different about your configuration
> that would cause it not to work. I'm running it ok on a Solaris 8 box
> with Apache 2.0.48. FWIW, I used apxs to compile mod_rewrite rather
> than compiling it in with the source.
>
>
> In httpd.conf do you have ServerName set to:
> -------------------------------------------
> ServerName lark.cs.unc.edu:80
>
> and Listen set to:
>
> Listen lark.cs.unc.edu:80
>
>
>
>
> And in ssl.conf do you have Servername set to:
> ---------------------------------------------
> ServerName lark.cs.unc.edu
>
> and Listen set to:
>
> Listen lark.cs.unc.edu:443
>
>
> Jeff
>
--
John W. Sopko Jr. University of North Carolina
email: sopko AT cs.unc.edu Computer Science Dept., CB 3175
Phone: 919-962-1844 Sitterson Hall; Room 044
Fax: 919-962-1799 Chapel Hill, NC 27599-3175
More information about the unclug
mailing list