Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
apache && authentication && ssl [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
BlinkEye
Veteran
Veteran


Joined: 21 Oct 2003
Posts: 1046
Location: Gentoo Forums

PostPosted: Thu Aug 19, 2004 1:34 pm    Post subject: apache && authentication && ssl [SOLVED] Reply with quote

i just read the article about authentication on http://httpd.apache.org/docs/howto/auth.html#basicworks. it says that there are different ways to do that and that the basic way isn't encrypted. my idea is to authenticate via ssl - but as it isn't mentioned in the howto it may be not possible although i don't see why this shouldn't work:

Code:
# pts/29 cat .htaccess

# If i try to access my public_html folder on port 80,
# force me to use the secure socket.
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule .* https://%{SERVER_NAME}/~my_username/ [R,L]

AuthType Basic
AuthName "My Personal files"
AuthUserFile /usr/local/apache/passwd/passwords
Require user my_username

with this configuration i actually get redirected to the secure socket, but only after the authentication. of course i could use a different password as the system login password but it gets annyoing to remember all those passwords so i'd like it encrypted. there is another way authenticating (digest) - but why use it if ssl actually works?

any ideas?
_________________
Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick


Last edited by BlinkEye on Sat Oct 23, 2004 9:35 am; edited 2 times in total
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Thu Aug 19, 2004 8:05 pm    Post subject: Reply with quote

Isn't that more of a design flaw ?
As you write in your comments, if you want to access your homepage from an unencrypted server - what does that mean ?
You can't access anything from a server - you access the server.
Just disable any normal http access to it and only open the SSL one.
That way you will have to authenticate over SSL, no ?
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


Joined: 21 Oct 2003
Posts: 1046
Location: Gentoo Forums

PostPosted: Thu Aug 19, 2004 8:46 pm    Post subject: Reply with quote

you're right, my comment is (was) wrong. what i want is communicating on a secure line - hence i redirect an unsecure connection to the secure socket. but the authenticatin is done before that redirection and that's my problem.
as i mentioned earlier: i haven't read about this approach anywhere - especially not on the apache pages - so i guess it doesn't work. still, i don't see why
_________________
Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick
Back to top
View user's profile Send private message
BlinkEye
Veteran
Veteran


Joined: 21 Oct 2003
Posts: 1046
Location: Gentoo Forums

PostPosted: Sat Oct 23, 2004 9:34 am    Post subject: Reply with quote

SOLUTION:

i put the following in my .htaccess file:
Code:
RewriteEngine on
RewriteBase /~my_username
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^(.*) https://mydomainname/~my_username [R]

_________________
Easily backup up your system? klick
Get rid of SSH Brute Force Attempts / Script Kiddies klick
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum