Some images do not load under http, but do under https - ssl

I've come across an issue where some images on a site load under https but do not load under http.
For example if you go to https://www.mydomain.com/myimage.gif, the image appears fine, but if you go to http://www.mydomain.com/myimage.gif the image comes back with a not found error. This happens to only certain images. Other images load fine either way. Even images in the same directory as the problem images load fine.
I know that if SSL is not set up correctly I've seen a similar issue, but it's always been with the entire site, not with a few images.
This is on an IIS6 server.

Problem solved. It turns out that the https site was created using a physical copy of the actual site under the SSL port, this means there were 2 versions of the site being served under the same domain name, one under port 80 and one under port 443.
The issue appeared because someone updated the port 443 site. The images missing in the port 80 site were actually not there, causing the 404 error.
Thanks for the help. Too bad this got modded down... I guess this question is not strictly a programming question?

Moving a comment out to answer in the hopes it'll get a response:
Is this behavior consistent across browsers and/or PCs/Macs?

Try using Fiddler to see what is happening with that particular image when the page is loaded.

Related

Recent https (SSL) addition, getting site cannot provide secure connection error page

Recently our website went from http to https. I, and others, are randomly getting "The Site Can't Provide a Secure Connection" page. Upon refresh, the page loads just fine. Why are we getting this initial page randomly?
FYI... We have http to https redirects in place.
Impossible to say without more details, but some things I can suggest are:
You have multiple servers and some are configured correctly and some incorrectly.
You are not including the full certificate chain. Sometimes your browser has the missing intermediary cached and sometimes not (see this answer for more info here: https://serverfault.com/questions/826100/ca-certificate-trouble-with-squid-on-centos7/826321#826321)
A bug in browser/software. I had this issue on Chrome when using Apache HTTP/2. Never did figure it out but a Chrome update fixed it.
Run https://www.ssllabs.com/ssltest/ on your site to confirm not a problem with your https set up and, if that doesn't work, or you don't understand the results it gives, then update your question with more details (what Server and Browser you are using and what version, if you have any proxy in place between your Browser and the site and, ideally the website name) if you want people to help you.
Also be aware this is a programming site and some people don't like these questions here and will suggest other Stack Exchange sites but honestly don't know where this question is best placed: serverfault.com maybe, but is for professional SysAdmins only, Unix and Linux seems a little generic (not even sure if you are using a Linux webserver!), Webmasters is more for content and SEO questions, Information and Security is more for theoretical SSL/TLS questions...

Reaching website through IIS from an other computer

I think I'm almost done with this problem but there is something off. Perhaps you guys can help me out.
I've created a website which I can reach through C:\inetpub\wwwroot\KLABrowser\publish.htm.
I've created a website through IIS called KLABrowser. The http binding is listed on port 1111, with * as IP adress.
When going to http://xxx.xx.xx.xx:1111/KLABrowser/publish.htm, I get a Cannot find page error. When I go to http://xxx.xx.xx.xx/KLABrowser/publish.htm, I get a blank page but no error. When I hit the first link (the psychical path), I get to see the website.
What am I missing? What should I configure so that I can reach the website through my IP on an other computer in the local network?
This answer provided the solution.
You must specifically choose "Static Content" under Common HTTP Features in the same Add/Remove Windows Features list to show the page.

Classic ASP and SSL in a folder

We have a folder in a classic asp site that has ssl set up for that folder. It works but when you load the first page within the folder and then follow a hyperlink to another page in the folder you get kicked back to the page outside the folder which led into the https stuff.
Repeat the process (follow link on non https page > go to https folder > follow link to other page in https folder) and it all works fine, for a random number of hops between pages in the https folder, then bang, kicked out again.
I have noticed that the session ID changes all the time when hopping between pages in the https folder. Someone said it was due to IE compatabilty mode swapping but I have forced the thing with a header and using IE dev tools (miss you Firebug) I see the mode stays constant. any ideas please?
We had a similar issue with another project last year. #padas is correct. Sessions on http and https are different and the server will have a problem with it. The option we went for was to https the whole site. It makes sense anyway and helps the user gain confidence in what they are browsing.
It sounds like your traversing between http and https and that will change the session id. If your pages are using session id's to track people you will have issues. You are better off dropping a cookie or forcing https.

Wordpress pages randomly serve as RSS/XML content

For months we have been struggling with a weird issue on 1 of our Wordpress Network installations. We have 4 installations on 1 VPS and only one of the four installations generates this error.
The problem is that pages on all sites that run on that Wordpress Network installation, randomly(?) seem to try and parse the page as being RSS content. See this screenshot:
Full image
This only happens once per session (if it does at all) and after refreshing the page, all is good. This makes it extremely hard to fix, because debugging is almost impossible.
Whenever the issue seems to appear, the (RSS) content that is being displayed, is that of a different page..
Could this be a Wordpress issue, or could this be an issue in the Apache config?
Some domains we are encountering this on:
http://www.skynetsg.co.za/
http://www.workplacestrategies.co.za/
http://www.beachbreaks.co.za/
I hope there is someone that could help me solve this issue!
Update:
I just had the issue on the page: http://www.skynetsg.co.za/peter-sserwanga/ that was newly created. I checked the apache logs and they show nothing strange, just a 200 OK header..
Below is a link that may fix your problem. If your running WHM/Cpanel, you may have to recompile apache with out certain modules.
rss-feed-displayed-instead-of-html-page

My server intermittently won't serve pages to Safari 4... Need help!

I just upgraded my browser to Safari 4 and find that our website is having some major issues specific to that browser version. As I click through pages on our site it takes one or two clicks before the browser window simply goes blank. When the window goes blank, there is no source to view and no matter how many times I try to reload or if I try to load other pages of the site, I still get the blank window. It's as if the server takes the request and simply returns a blank page.
If I wait over 15 seconds and then hit refresh again, the page loads fine. Not sure why it starts working again... Maybe a cache issue???
It's a PHP site and I've tried turning on error_reporting(E_ALL);, but that doesn't give any information. I also tried putting an echo statement at the very beginning of the index.php file and verified that the page still goes blank without echoing that statement, so I'm thinking the problem is not php code specific. The Apache error log does not show any issues. I have the same site on my local development server and it doesn't have the problem.
Safari 4 is the only browser that shows this problem. Does anyone have any ideas how to debug/fix this?
My webserver is ubuntu Hardy running Apache 2 an Mysql 5.
We have an nginx load balancer in front of the apache server and I just figured out that Safari 4 requires the nginx keepalive_timeout setting to be 0. Took all day to figure that one out...
I've been having the same issue with Safari 4 on my site but found that when reloading pages that return blanks, the request never even makes it to the server. No entry shows up in Apache's logs.
The keepalive setting for your LB sounds like a direction I could sniff in. Not sure what leeway I will have though, being on shared hosting.
Mike
This looks to be a safari bug. We experience it too, and I have read other reports.
http://discussions.apple.com/thread.jspa?threadID=2064488&start=0&tstart=0