Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 15th, 2008, 01:21 PM
typenerd typenerd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 63 typenerd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 19 m 10 sec
Reputation Power: 4
How to serve up non-secure master.css for https scripts

I have several scripts on other servers that need to reference a master.css. The problem is these other scripts are running over https and master.css is on regular http and when referenced I get the error about mixed content types (some secure, some non-secure).

Can I create a reference to the master.css over https? Something with mod_rewrite or some other kind of alias?

Thanks!
-dave

Reply With Quote
  #2  
Old April 15th, 2008, 10:42 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information.
 
Join Date: Jan 2005
Location: Florida
Posts: 2,596 hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 27176 Folding Title: Starter FolderFolding Points: 27176 Folding Title: Starter Folder
Time spent in forums: 1 Month 1 Week 1 Day 5 h 37 m 8 sec
Reputation Power: 1166
Quote:
Originally Posted by typenerd
I have several scripts on other servers that need to reference a master.css. The problem is these other scripts are running over https and master.css is on regular http and when referenced I get the error about mixed content types (some secure, some non-secure).

Can I create a reference to the master.css over https? Something with mod_rewrite or some other kind of alias?

Thanks!
-dave


a CSS file can be used on both http and https connections. When you get a message regarding secure and non-secure references, it's referring to there being a reference for both https and http in the code. In other words, if you explicitly state http:// somewhere in the CSS file, it will cause that problem when trying to access an https site. If you can, use relative paths as opposed to absolute paths.

Are you sure it's the css file causing the problem?

Reply With Quote
  #3  
Old April 16th, 2008, 08:42 AM
typenerd typenerd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 63 typenerd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 19 m 10 sec
Reputation Power: 4
In the https html code I'm referencing an absolute path to an http server; that's how I have to do it. So I need the http server to serve an exact copy of the master.css but over https. How can I create that duplicate copy automatically?

Reply With Quote
  #4  
Old April 16th, 2008, 01:18 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information.
 
Join Date: Jan 2005
Location: Florida
Posts: 2,596 hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 27176 Folding Title: Starter FolderFolding Points: 27176 Folding Title: Starter Folder
Time spent in forums: 1 Month 1 Week 1 Day 5 h 37 m 8 sec
Reputation Power: 1166
Quote:
Originally Posted by typenerd
In the https html code I'm referencing an absolute path to an http server; that's how I have to do it. So I need the http server to serve an exact copy of the master.css but over https. How can I create that duplicate copy automatically?


Alright... I think I might be misunderstanding, but let's try to clarify...

In the HTML code itself, you have an absolute path to an HTTP server?

In the CSS file, there are no absolute paths, correct?

If both of the above were answered yes, then I'm not sure why you need a copy of the master.css file.

At the top of your HTML code, you will have a reference to master.css which doesn't matter whether you're viewing it in HTTP or HTTPS. If you have an absolute path to HTTP in your HTML code, then copying the css file isn't going to do anything. The non-secure dialog box refers to the absolute path in your HTML code.

(Of course, if you are referring to the absolute path being in your CSS file, then let me know.. I might have misread your post).

Reply With Quote
  #5  
Old April 16th, 2008, 01:25 PM
typenerd typenerd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 63 typenerd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 19 m 10 sec
Reputation Power: 4
Hey Hiker, thanks for helping.

Well my style sheet is this:
http://www.swfwmd.state.fl.us/level3.css

And my script would be on a server like this:
https://www5.swfwmd.state.fl.us

So I need to reference the level3.css in the https environment but I need to avoid the non-secure dialogue, so I need to create a https version of that level3.css on the www server, right? What do you think?

Reply With Quote
  #6  
Old April 16th, 2008, 01:35 PM
hiker's Avatar
hiker hiker is offline
They're coming to take me away
Click here for more information.
 
Join Date: Jan 2005
Location: Florida
Posts: 2,596 hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)hiker User rank is General 3rd Grade (Above 100000 Reputation Level)  Folding Points: 27176 Folding Title: Starter FolderFolding Points: 27176 Folding Title: Starter Folder
Time spent in forums: 1 Month 1 Week 1 Day 5 h 37 m 8 sec
Reputation Power: 1166
Quote:
Originally Posted by typenerd
Hey Hiker, thanks for helping.

Well my style sheet is this:
http://www.swfwmd.state.fl.us/level3.css

And my script would be on a server like this:
https://www5.swfwmd.state.fl.us

So I need to reference the level3.css in the https environment but I need to avoid the non-secure dialogue, so I need to create a https version of that level3.css on the www server, right? What do you think?


When you reference your css file in the HTML code, what is your code?

Generally, it would be something like:
Code:
<link rel="stylesheet" href="level3.css" type="text/css" charset="utf-8">

Reply With Quote
  #7  
Old April 17th, 2008, 10:15 AM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,124 jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 10 h 58 m 38 sec
Reputation Power: 717
typenerd, we're making a few assumptions because you haven't fully explained your situation. Be specific, don't expect us to know your environment, and don't expect your environment to be identical to what we've used.

Are your SSL and non-SSL servers the same server with the same document root?

They'll need to be in order for hiker's approach to work, and I'm thinking they're not since www5 looks like it's part of a cluster. Do you have a single non-SSL server at www and several SSL servers in a cluster at www#

Please provide some information about your infrastructure and Apache configuration in relation to SSL. Some environments have separate DocumentRoots for non-SSL and SSL files and some don't; we need to know how things are setup.
Comments on this post
hiker agrees: Didn't even notice the www5... good catch
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
  #8  
Old May 7th, 2008, 06:50 AM
typenerd typenerd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 63 typenerd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 19 m 10 sec
Reputation Power: 4
Sorry for not being around here; work got busy and I forgot about this post. Yeah, the paths are two completely different computers, www is a freebsd box while www5 is a windows .net server.

So the www5 developers always make a copy of my www/master.css and when I update it I have to coordinate that they update their copy. They should just reference the file, but they're in an https environment and www/master.css is over http, not https.

So I need a way to reference master.css over https; therefore I need a way to serve the same master.css over http and https.

Sorry I didn't write clearer posts earlier. Thanks for the discourse so far.

Reply With Quote
  #9  
Old May 7th, 2008, 07:09 AM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,124 jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level)jharnois User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 1 Day 10 h 58 m 38 sec
Reputation Power: 717
Here are some possible solutions:

1) Enable SSL on your server, assuming you have a wildcard certificate that can be placed on your server, too.

2) Setup rsync in a cron to either send your css (and any other file) to the SSL servers or on the SSL servers to get the css from your server (see the rsync man page).

3) Get FTP access to the SSL servers so you can upload your css. This could be a separate folder, and the FTP settings could be made to only allow you to upload to that folder (and even make it so you can only overwrite files instead of being able to create new ones).

4) Have the SSL server administrators setup a reverse proxy to bring your server into their local URL space, but I'm not sure how well this will work between SSL and non-SSL servers.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > How to serve up non-secure master.css for https scripts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |