You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by rkw <wi...@nortel.com> on 2009/07/28 21:12:25 UTC
[users@httpd] Adding Alias with HTTPS
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?
--
View this message in context: http://www.nabble.com/Adding-Alias-with-HTTPS-tp24706066p24706066.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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
Re: [users@httpd] Adding Alias with HTTPS
Posted by rkw <wi...@nortel.com>.
OK, needed to add:
RewriteEngine on
:(
Thanks.
rkw wrote:
>
> It is still just loading the HTTP page fropm the alias, not redirecting to
> HTTPS. Any ideas?
>
> Also, I would like it to be more generic as far as the redirect host is
> concerned.
>
> Could I just do:
>
> RewriteRule myApp/(.*) https://%{HOSTNAME}/myApp/$1 [R]
>
> or something similar?
>
>
> Krist van Besien wrote:
>>
>> On Tue, Jul 28, 2009 at 9:12 PM, rkw<wi...@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
>>
>>
>>
>
>
:-((:-((:-((
--
View this message in context: http://www.nabble.com/Adding-Alias-with-HTTPS-tp24706066p24721896.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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
Re: [users@httpd] Adding Alias with HTTPS
Posted by rkw <wi...@nortel.com>.
It is still just loading the HTTP page fropm the alias, not redirecting to
HTTPS. Any ideas?
Also, I would like it to be more generic as far as the redirect host is
concerned.
Could I just do:
RewriteRule myApp/(.*) https://%{HOSTNAME}/myApp/$1 [R]
or something similar?
Krist van Besien wrote:
>
> On Tue, Jul 28, 2009 at 9:12 PM, rkw<wi...@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
>
>
>
--
View this message in context: http://www.nabble.com/Adding-Alias-with-HTTPS-tp24706066p24720464.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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
Re: [users@httpd] Adding Alias with HTTPS
Posted by Krist van Besien <kr...@gmail.com>.
On Tue, Jul 28, 2009 at 9:12 PM, rkw<wi...@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