Resend my activation email : Register : Log in 
BCF: Bike Chat Forums


HTTP Auth over SSL

Reply to topic
Bike Chat Forums Index -> The Geek Zone
View previous topic : View next topic  
Author Message

t121anf
World Chat Champion



Joined: 23 Feb 2007
Karma :

PostPosted: 01:08 - 04 Mar 2017    Post subject: HTTP Auth over SSL Reply with quote

I'm trying to setup a test webserver which I need to run webdav on, the OS being used is Debian as I'm told by the internet it's the closest to Raspbian which I plan to us when I have tested it out.

So far, I've installed the OS, Apache and webdav using basic http authentication.

So far so good, I can update the files on in webdav folder via various methods.

However I need SSL for an app I want to use, i've created a self signed cert* and applied it to apache. Browsers moan it's insecure but traffic is going over SSL.

The problem is once I add SSL, web auth stops working. If I go to my server via http returns an error about expecting https (400 bad request). Going via https I see my site/file but no authentication.

Can anyone advise on how to setup apache to use SSL and then authentication?

*for the live server I plan to use LetsEncrypt
 Back to top
View user's profile Send private message You must be logged in to rate posts

t121anf
World Chat Champion



Joined: 23 Feb 2007
Karma :

PostPosted: 01:44 - 04 Mar 2017    Post subject: Reply with quote

I think I've solved the issue.

This line in the conf
<VirtualHost *:80>

needed to be updated to
<VirtualHost *:443>

initial tests show datestamps matching my edits, i.e. edit at 00:40 in web app, file on the server changes to 00:40 and so on.

Slight issue that my desktop app has now stopped talking to the files on the web server but I'll look at that tomorrow*

*or today, it's late, time for bed.
 Back to top
View user's profile Send private message You must be logged in to rate posts
- This post is not being displayed because the poster has bad karma. Unhide this post / all posts.

undefined
Derestricted Danger



Joined: 09 Mar 2017
Karma :

PostPosted: 00:15 - 11 Mar 2017    Post subject: Reply with quote

I know you've already solved the problem but for the sake of completeness, you can always add in a permanent redirect to catch the times you/users forget to use the right protocol:

Code:

<VirtualHost *:80>
  ServerName addy.com
  redirect / https://addy.com
</VirtualHost>

<VirtualHost *:443>
...
</VirtualHost>


Alternatively, mod_rewrite and rewrite rules.
____________________
'89 Honda MT50 > '97 Yamaha Thundercat
 Back to top
View user's profile Send private message You must be logged in to rate posts

t121anf
World Chat Champion



Joined: 23 Feb 2007
Karma :

PostPosted: 00:27 - 11 Mar 2017    Post subject: Reply with quote

Thanks for that, I'd need it anyway when I put this into a live environment (can't at present wife is running a campaign this month)
 Back to top
View user's profile Send private message You must be logged in to rate posts
Old Thread Alert!

The last post was made 7 years, 48 days ago. Instead of replying here, would creating a new thread be more useful?
  Display posts from previous:   
This page may contain affiliate links, which means we may earn a small commission if a visitor clicks through and makes a purchase. By clicking on an affiliate link, you accept that third-party cookies will be set.

Post new topic   Reply to topic    Bike Chat Forums Index -> The Geek Zone All times are GMT + 1 Hour
Page 1 of 1

 
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
You cannot attach files in this forum
You cannot download files in this forum

Read the Terms of Use! - Powered by phpBB © phpBB Group
 

Debug Mode: ON - Server: birks (www) - Page Generation Time: 0.08 Sec - Server Load: 0.54 - MySQL Queries: 17 - Page Size: 46.64 Kb