Solved

SSL, what is "allowed?

Posted on 2011-03-10
2
213 Views
Last Modified: 2012-05-11
So,

I have a main domain, ex. domain.com
And a subdomain, ex. secure.domain.com

I plan to add SSL to secure.domain.com

The frontpage of the subdomain will use the same layout and styling as the main domain (domain.com) and I would like to use the same css files as the main domain. The rest of the subdomain will use a seperate/new layout, so thats no problem.

The problem is, someone told me that all files in include (images, css, files outside public_html etc... everything), needs to be placed within the subdomain (for SSL). Is this true? Do I have to copy all my css, images and other files from my main domain to my subdomain?
0
Comment
Question by:kgp43
2 Comments
 
LVL 19

Expert Comment

by:Michael701
ID: 35101776
What I've done in the past is to place the secure scripts (php) in a folder under the host root. So the url would be https://www.mysite.com/secure/login.php. You can then make sure that when a script is run it's under the HTTPS:// url

This way the entire site can be viewed under the ssl.

This gets away from the warning messages when accessing files outside of the SSL domain.
0
 
LVL 30

Accepted Solution

by:
Brad Howe earned 500 total points
ID: 35101815
Hi,

CSS, Images and other files should use a relative path in the first place like ..\file.gif or ..\..\image.png. With that said, Anything that is posted in a browser under https (is secure and encrypted).

Now, the domain you want to secure is secure.domain.com. Assuming you are creating a brand new virtual host setup in your httpd.conf and simply creating virtual paths to your css/images, it will be secure.

Remember it is the site that is secure and everything under it. If the virtual host is only listening on port 443, then everything under it - not matter where the content is stored, is secure and served under SSL.

Cheers,
Hades666
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

803 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