Solved

Apache and SSL, basic question

Posted on 2006-06-09
6
208 Views
Last Modified: 2010-03-04
I am building a website using PHP and its going to live on an Apache server. There are certain parts of the site that are just content, they don't need to be secure but there are a few pages like the login and settings pages that I'd like to be secure. I've heard about SSL and I was wondering. How does it work? Do I need to add special code to my PHP code or is it something that I just do on the server.

For example, say my source file is login.php, how do I just tell Apache to use SSL on that? Sorry if this is a pretty basic and newbie question but I am lost when it comes to this sort of stuff.
0
Comment
Question by:Linky
  • 3
  • 3
6 Comments
 
LVL 15

Accepted Solution

by:
periwinkle earned 125 total points
ID: 16870749
Assuming that you have SSL set up on your server, with a certificate, etc., to access via SSL is simply a matter of changing the url from:

http://www.yourdomain.com/login.php

to

https://www.yourdomain.com/login.php

(i.e. from http:// protocol to https:// protocol).
0
 
LVL 2

Author Comment

by:Linky
ID: 16871131
then what is stopping people from just typing http instead of https
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 16871485
Nothing, unless you code preventatively!
0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
LVL 2

Author Comment

by:Linky
ID: 16871801
And how can that be done, so that even if they type http://whatever it will use SSL anyway. I'm using PHP but I doubt that matters since this is mainly dealing with the server.
0
 
LVL 15

Expert Comment

by:periwinkle
ID: 16872296
It won't - unless you redirect the http:// request to a https:// request.  But from what you have said, you're only having a few pages that are ssl - if you LINK to them as https:// then they'll be secure!
0
 
LVL 2

Author Comment

by:Linky
ID: 16885108
Sounds good, thanks for the help.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question