View previous topic :: View next topic |
Author |
Message |
abonventre Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
![](images/avatars/10102791623fef28f894558.gif)
Joined: 19 Jun 2003 Posts: 80 Location: Boston, MA
|
Posted: Sun Jun 27, 2004 10:44 pm Post subject: question secure http |
|
|
How would I set up my web server to only allow secure connections to specific pages on my computer?
A |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
RedDawn Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/88458716741351efb6fe7f.gif)
Joined: 22 Sep 2003 Posts: 368 Location: Los Angeles, California
|
Posted: Mon Jun 28, 2004 4:32 am Post subject: |
|
|
All i know is that you have to have mod_rewrite loaded and rewrite the incomming url into the https url..
i have done this in the past but i lost the configuration file used for that..
id apacheconf2.conf was deleted in my old install now im running a new one..
search the forums for mod_rewrite.. and i thinkg you migt be able to find something.
Searching the forums for mod_rewrite brough up this:
9:35PM
https://forums.gentoo.org/viewtopic.php?t=128831&highlight=modrewrite
9:42PM
https://forums.gentoo.org/viewtopic.php?t=64567&highlight=modrewrite
AND VIOLA!!!
Add this to the end of you apache2conf file:
Code: |
RewriteEngine on
# SERVER_PORT <> Port:443
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^dir(/.*)?$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
and do a /etc/init.d/apach2 restart
and test it!
it works on my site!
now is turned off though!
http://reddawn.homelinux.net |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|