Zen Cart Logo
Forums / General Questions / site ssl stopped working after delete and restore files

site ssl stopped working after delete and restore files

Views: 2,450

Results 1 to 11 of 11
9 May 2012, 2:15 PM
#1
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

site ssl stopped working after delete and restore files

A wrong keystroke deleted all the files (not folders) in my public_html folder. I restored the files from yesterday's backup and the site runs fine under http, but when it goes to https (either admin or store login), I get a blank page with ./public_html displayed.

What am I missing?

9 May 2012, 3:10 PM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: site ssl stopped working after delete and restore files

divinelighting:

I get a page with "./public_html" displayed.

What am I missing?

Whatever it is, it isn't something obvious. In fact I don't think I've ever seen anything like this before.

If I had to take a guess though, I'd suggest that you might have an .htaccess file in this folder that is causing some kind of strange server behavour. If so, remove this file. Actually, for testing purposes you should be able to remove all of those files except index.php.

If that solves the problem, re-add nddbc.html, page_not_found.php & ipn_main_handler.php

To the best of my knowledge, none of the other files in that folder are actually used.

Cheers
Rod

9 May 2012, 3:28 PM
#3
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: site ssl stopped working after delete and restore files

I thought the same thing about htaccess. If I remove it, then I get 'not found' on all attempted pages.
I tried deleting all but htaccess and index.php with the same result, I can browse catalog but not go to https (log in)

Another odd thing, I was able to navigate admin just fine until I logged out. Now I can't log back into admin because of the same issue. I have tried turning ssl off in configure files, but it still redirects. Here is my htaccess

NOTE: Replace /shop/ with the relative web path of your catalog in the "Rewrite Base" line below:

#.htaccess to prevent unauthorized file access files
OPTIONS -Indexes -ExecCGI
IndexIgnore /

<Files .htaccess>
order allow,deny
deny from all
</Files>

Options +FollowSymLinks
RewriteEngine On
RewriteBase /

From Ultimate SEO URLs

RewriteRule ^(.)-p-(.).html$ index.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-c-(.).html$ index.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-m-([0-9]+).html$ index.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.
)-pi-([0-9]+).html$ index.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]
RewriteRule ^(.)-pr-([0-9]+).html$ index.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.
)-pri-([0-9]+).html$ index.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]
RewriteRule ^(.*)-ezp-([0-9]+).html$ index.php?main_page=page&id=$2&%{QUERY_STRING} [L]

For Open Operations Info Manager

RewriteRule ^(.*)-i-([0-9]+).html$ index.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

All other pages

Don't rewrite real files or directories

RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*).html$ index.php?main_page=$1&%{QUERY_STRING} [L]

9 May 2012, 3:53 PM
#4
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: site ssl stopped working after delete and restore files

divinelighting:

I thought the same thing about htaccess. If I remove it, then I get 'not found' on all attempted pages.

Is your store located in the 'root' folder (public_html/) or is it in a folder like /public_html/store/ ?

This may or may not be relevent.. I'm just trying to get an idea of your setup.

divinelighting:

Another odd thing, I was able to navigate admin just fine until I logged out. Now I can't log back into admin because of the same issue. I have tried turning ssl off in configure files, but it still redirects. Here is my htaccess

OK, something else is amiss, because the link to your login page is still suggesting SSL is still enabled. (Perhaps you re-enabled it before I checked?)

What I'd be doing at this stage is ensure that you disable SSL (in both config files) and don't re-enable it until you can get valid login and page displays without it. You can check to ensure SSL is off by placing you mouse over the 'login' link and checking to see if it is pointing to https://xxx or just http:/xxxx

If it always points to https:// then for some reason of other the config files that you have changed are not the ones zencart is actually using.

Only after you get all working correctly without SSL should you consider re-enabling it, at which point we can start looking at SSL problems only, rather than what could at this point be almost anything (Well, anything that is currently eluding my brilliant diagnostic skills) <he says with tongue firmly in cheek> <grin>

Cheers
Rod

9 May 2012, 3:57 PM
#5
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: site ssl stopped working after delete and restore files

Still no luck here getting https viewable. However, I did disable ssl (had to change config permissions to change files) and now the site appears fully functional.

Hopefully, someone has some other ideas or can recommend some other troubleshooting ideas. To repeat the issue, all https pages show only ./public_html on the screen. This was after I accidentally deleted files in my root directory, as well as the folders above root .htpasswd, public_ftp, and file private.html

I'm pretty sure that all files have been restored.

9 May 2012, 4:53 PM
#6
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: site ssl stopped working after delete and restore files

Hi Rod,
Thanks for your reply. We cross posted there. To answer your question, the store is in the root directory. I disabled ssl and the store functions normally. I don't see how this could be other than an htaccess or permissions issue.

9 May 2012, 4:54 PM
#7
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: site ssl stopped working after delete and restore files

I guess it could be a sessions or cache issue, though I really don'tknow enough to say....

10 May 2012, 3:40 AM
#8
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: site ssl stopped working after delete and restore files

Sorry for taking so long to get back to you. I needed sleep :)

Firstly, I can confirm that your site is now fully functional without SSL. I suggest you keep it that way until the issue has been resolved, because it will still allow sales (and since you use PayPal express you probably don't need SSL anyway).

Secondly, it is not a cache or sessions issue. This is easily confirmed by pointing your browser to any page on your site and using https:// rather than just http://

Example:
https://www.divinelighting.com shows the error
http://www.divinelighting.com works just fine.

By using these URL's explicitly is effectively showing that the problem has nothing to do with your zencart configuration files, or its session management. It could (in theory) be a cache problem, but trying URL's that I know wouldn't exist (eg https://www.divinelighting.com/wally) is a good way of elimitating this possibilty (if a page has never been requested before, it could never be in a cache).

In other words, with just one single test to https://www.divinelighting.com/wally has elimiinated many possible causes. (including URL rewrites/redirects)

OK, so here's the cruncher... I still can't think of anything that would cause the symptoms that are being presented. At the VERY LEAST I would have expected https://www.divinelighting.com/wally to redirect me to a page not found error (as it does when I attempt http://www.divinelighting.com/wally)

So, where to from here? I really don't think this problem has anything to do with you or zencart. I'm thinking it has something to do with the server configuration itself. For reasons that I can't explain, your SSL server simply isn't doing what an SSL server should be doing. It appears to have no concept of what files it should be serving up and the fact that it is showing the folder name ./public_html can only be caused by a server configuration error.

You will need to contact your host for help with this one. It is NOT something that you can fix yourself. Please feel free to post a copy of this posting when asking your host for help. It'll help prevent them feeding you billshot and suggesting that it is a zencart (or similar) configuration error.

DO mention about the accidental deletion of your files because there may have been a 'symbolic link' (or similar) hidden in your public_html folder that got accidently deleted, and if so, they'll know about it and will be able to quickly restore it for you without any further investigationing :)

Either way, it is stil lsomething that only your host can fix.

Cheers
Rod.

ps. If possible, please try to get them to explain what was amiss, because I'm really curious about exactly what would/could cause these symptoms. As stated, I've never seen anything like it before in my life (and I've been working with computers for nearly 30 years)

10 May 2012, 5:28 AM
#9
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: site ssl stopped working after delete and restore files

Solved! You were right about the symbolic link. I use directadmin.

Symbolic link was broken. Found solution here: http://www.webhostingtalk.com/archive/index.php/t-315593.html

Deleted private_html and then executed

ln -s /home/USERNAME/domains/DOMAIN.COM/public_html /home/USERNAME/domains/DOMAIN.COM/private_html

10 May 2012, 6:17 AM
#10
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: site ssl stopped working after delete and restore files

divinelighting:

Solved! You were right about the symbolic link. I use directadmin.

That's wonderful news. I just love it when my 'gut feeling' turns out to be correct when most/all logical explanations have been exhausted :)

divinelighting:

Found solution here: http://www.webhostingtalk.com/archive/index.php/t-315593.html

Just out of curiosity (no need to answer if you don't want), but did you find this solution yourself, or was it something that your host directed you too?

divinelighting:

ln -s /home/USERNAME/domains/DOMAIN.COM/public_html /home/USERNAME/domains/DOMAIN.COM/private_html

OK, my next question (again, no obligation to answer), but a 'typical user' wouldn't have a clue about the 'ln' command, let alone know how/where to use it (actually, I suspect that most people around here wouldn't even know what a Symbolic link is. Not that they need to). Was this something you did yourself via SSH(?), or was it something that your host had to do for you?

What I'm trying to determine here is, if I should ever come across this problem again, is the solution something that you feel a 'typical user' would be able to make use of (with guidance) or is it something that is best left to the host. In around about way, I guess I'm trying to figure it if your computer skills are a lot more advanced than I'm accustomed to, or are you just good at following advice/instructions? (Either way, this is intended as a compliment). You did good. :smile:

Cheers
Rod.

10 May 2012, 3:02 PM
#11
divinelighting avatar

divinelighting

Zen Follower

Join Date:
Jun 2006
Location:
Atlanta, GA
Posts:
124
Plugin Contributions:
0

Re: site ssl stopped working after delete and restore files

My computer skills are not advanced; I'm a tinkerer. That's why I get in 'trouble' so much. I only know very basic command lines, and look up something when I need to go beyond that. With the help of people like you, I always seem to be able to manage pretty well. I have a dedicated server so I am my own host. I would actually like to turn over cart and server management to a professional, but am too cheap to do that at this point. At some point I will definitely source it out.

I've ran into a lot of issues, but I have never had one that had not yet been addressed in some forum somewhere. If I can't find the solution, I post here, webhostingtalk, or directadmin.

To answer your other question, I think that the average zencart forum member could apply the above fix, with perhaps minimal additional instructions.