httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krist van Besien <krist.vanbes...@gmail.com>
Subject Re: [users@httpd] Adding Alias with HTTPS
Date Wed, 29 Jul 2009 09:04:59 GMT
On Tue, Jul 28, 2009 at 9:12 PM, rkw<wippel@nortel.com> wrote:
>
> I want to add an alias:
>
> Alias myApp /opt/installdir/myApp when I install my application. I can do
> this fine by adding a myApp.conf file into the /etc/httpd/conf.d folder
>
> But, this makes the application accessible both via http and https.
>
> I can add the alais into the Virtual Host on port 443 in the ssl.conf file
> and get it to work, but, ideally, it would be much easier to install if I
> could just do everything in myApp.conf file.
>
> How can I bind that alais to the Virtual Host on port 443 without changing
> the ssl.conf file?

I had a similar problem. My solution was to allow the existence of the
alias on the http host, but redirect it to the https host. Like this:

Alias /myApp/ /opt/installdir/myApp

RewriteCond %{HTTPS} off
RewriteRule myApp/(.*) https://www.mysite.com/myApp/$1   [R]

What you could also do is have the Rewrite return a Forbidden:

RewriteCond %{HTTPS} off
RewriteRule myApp/(.*) - [F]

HTH,

Krist

-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message