Zen Cart Logo
Forums / Basic Configuration / Modifying the <head> because SSL isn't working

Modifying the <head> because SSL isn't working

Locked

Views: 5,319

Results 1 to 20 of 30
This thread is locked. New replies are disabled.
31 Oct 2006, 4:00 PM
#1
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Modifying the <head> because SSL isn't working

In the head all of the pages of the executed .php files there is a <base href> tag and then there are the links to the two .css files for the template.

<base href="http://muskegohitmen.com/proshop/" />

<link rel="stylesheet" type="text/css" href="includes/templates/zc_gloss_black/css/stylesheet.css" />
<link rel="stylesheet" type="text/css" media="print" href="includes/templates/zc_gloss_black/css/print_stylesheet.css" />
</head>

Does anyone know how I could modify the link to those .css files??

31 Oct 2006, 4:22 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

Why? Zen Cart is smart- if you need a different Stylesheet just load it into your template's css directory with a name that follows convention.

31 Oct 2006, 7:44 PM
#3
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

Kim:

Why? Zen Cart is smart- if you need a different Stylesheet just load it into your template's css directory with a name that follows convention.

My webhost uses a shared ssl which points zen cart through a different base URL than where the origonal instalation is located and .css is not rendered corrently using reletive path name. I need to change it to a static URL. Apparently, zen cart is not smart enough

31 Oct 2006, 9:15 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

Who is the host?

31 Oct 2006, 10:36 PM
#5
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

It is bluehost.com

Kim:

Who is the host?

31 Oct 2006, 11:00 PM
#6
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,627
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

A search for bluehost comes up with 27 threads, might want to check them and see if there are some hosting specific configurations that need to be made.

1 Nov 2006, 12:27 AM
#7
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

other than purchasing a dedicated server and another ssl certificate....not really

so is there a way to change those links??

Kim:

A search for bluehost comes up with 27 threads, might want to check them and see if there are some hosting specific configurations that need to be made.

1 Nov 2006, 2:56 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Modifying the <head> because SSL isn't working

  1. what is the shared-ssl URL they've given you ?

  2. what are the contents of your /includes/configure.php file (without password)?

1 Nov 2006, 9:36 AM
#9
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

https://secure.bluehost.com/~muskegoh/

<?php
/**
 *
 * @package Configuration Settings
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */


// Define the webserver and path parameters
  // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
  // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
  define('HTTP_SERVER', 'http://muskegohitmen.com');
  define('HTTPS_SERVER', 'https://secure.bluehost.com/~muskegoh');

  // Use secure webserver for checkout procedure?
  define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_CATALOG', '/proshop/');
  define('DIR_WS_HTTPS_CATALOG', '/proshop/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

  define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/muskegoh/public_html/proshop/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
  define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', 'zen_');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'muskegoh_zc1');
  define('DB_SERVER_PASSWORD', '************');
  define('DB_DATABASE', 'muskegoh_zc1');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'database'); 
  define('DIR_FS_SQL_CACHE', '/home/muskegoh/public_html/proshop/cache');

?>
```> **DrByte:**
>
> 1. what is the shared-ssl URL they've given you ?
> 
> 2. what are the contents of your /includes/configure.php file  (without password)?
1 Nov 2006, 10:59 PM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Modifying the <head> because SSL isn't working

You'll see that going to this address:
https://secure.bluehost.com/~muskegoh/proshop/index.php
... does bring up your site, but does not display the stylesheet.

However, View Source in the browser shows that the base href is correct:
https://secure.bluehost.com/~muskegoh/proshop/

However, it is blocking access to your stylesheet. ie, going directly to the stylesheet should display its contents. In your case, a 403 forbidden error appears.
https://secure.bluehost.com/~muskegoh/proshop/includes/templates/zc_gloss_black/css/stylesheet.css

Further, going to your secure URL without specifying the /proshop/ folder also appears to block access to certain content, such as a flash object.
https://secure.bluehost.com/~muskegoh/

This suggests to me that bluehost hasn't properly configured the shared SSL, thus leaving you with many 403 and other problems.

And to top it all off, your shared SSL pages are INTENSELY slow.

What is their tech support telling you?

BTW ... the way you have your configure.php file set up ... is right. This works well for most correctly-configured servers, including shared SSL environments.

As an aside, it appears that your original post suggested that maybe you knew most of what I just stated, and were hoping to simply use a non-SSL URL for the base href, and thus get around the 403 errors. While that would work in principle, it will result in a problem ... all your pages will not be properly secured, there will be no padlock displayed to the customer, and their browser will likely give errors saying that parts of the content on the page are not secure. That would be counter-productive.
The solution is to get bluehost to resolve their misconfiguration problem ... or to buy yourself an SSL certificate (they're not that expensive anymore).

2 Nov 2006, 2:19 AM
#11
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

Well I cotacted theird support to start off and they said that it was probably something to do with the way I had my zen cart configured, which is how I ended up here.

It is wierd, because I have two domains on blue host set up the same way only one works correctly. I pointed that out to them and said it was basically user error.

So I'll re-open the ticket and see if i can get them to take a look at it again.

Thanks Doc! Ill keep you posted.

12 Nov 2006, 12:10 AM
#12
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

So I got tired of dealing with bluehost after about 2 weeks, broke down purchased a dedicated IP, and the turbo SSL from go daddy. Had blue host install all the stuff for me and it STILL doesn't load the .css files.

https://www.muskegohitmen.com/proshop/index.php?main_page=down_for_maintenance

includes configure

<?php
/**
 *
 * @package Configuration Settings
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */


// Define the webserver and path parameters
  // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
  // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
  define('HTTP_SERVER', 'http://www.muskegohitmen.com');
  define('HTTPS_SERVER', 'https://www.muskegohitmen.com');

  // Use secure webserver for checkout procedure?
  define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_CATALOG', '/proshop/');
  define('DIR_WS_HTTPS_CATALOG', '/proshop/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

  define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/muskegoh/public_html/proshop/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
  define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', 'zen_');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', '****');
  define('DB_SERVER_PASSWORD', '*****');
  define('DB_DATABASE', 'muskegoh_zc1');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'database'); 
  define('DIR_FS_SQL_CACHE', '/home/muskegoh/public_html/proshop/cache');

?>

admin/includes configure file.

<?php
//
/**
 *
 * @package Configuration Settings
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */


// Define the webserver and path parameters
  // Main webserver: eg, http://localhost - should not be empty for productive servers
  // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
  // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
  // HTTP_CATALOG_SERVER is your Main webserver: eg, http://www.yourdomain.com
  // HTTPS_CATALOG_SERVER is your Secure webserver: eg, https://www.yourdomain.com
  /* 
   * URLs for your site will be built via:  
   *     HTTP_SERVER plus DIR_WS_ADMIN or
   *     HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or 
   *     HTTP_SERVER plus DIR_WS_CATALOG or 
   *     HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
   * ...depending on your system configuration settings
   */
  define('HTTP_SERVER', 'http://www.muskegohitmen.com');
  define('HTTPS_SERVER', 'https://www.muskegohitmen.com');
  define('HTTP_CATALOG_SERVER', 'http://www.muskegohitmen.com');
  define('HTTPS_CATALOG_SERVER', 'https://www.muskegohitmen.com');

  // Use secure webserver for catalog module and/or admin areas?
  define('ENABLE_SSL_CATALOG', 'true');
  define('ENABLE_SSL_ADMIN', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_ADMIN', '/proshop/admin/');
  define('DIR_WS_CATALOG', '/proshop/');
  define('DIR_WS_HTTPS_ADMIN', '/proshop/admin/');
  define('DIR_WS_HTTPS_CATALOG', '/proshop/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
  define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
  define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_ADMIN', '/home/muskegoh/public_html/proshop/admin/');
  define('DIR_FS_CATALOG', '/home/muskegoh/public_html/proshop/');

  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
  define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', 'zen_');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', '**********');
  define('DB_SERVER_PASSWORD', '*********');
  define('DB_DATABASE', 'muskegoh_zc1');
  define('USE_PCONNECT', 'false'); // use persistent connections?
  define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'database'); 
  define('DIR_FS_SQL_CACHE', '/home/muskegoh/public_html/proshop/cache');

?>
12 Nov 2006, 12:27 AM
#13
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Modifying the <head> because SSL isn't working

Hey part timer,
do me a favor quick switch back to the classic template for just a minute

12 Nov 2006, 12:39 AM
#14
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

no problem
Done

12 Nov 2006, 1:02 AM
#15
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Modifying the <head> because SSL isn't working

OK that wasnt it,
this is weird,
I have never seen this.
I was checking the classic to see if it was a template issue

12 Nov 2006, 1:05 AM
#16
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Modifying the <head> because SSL isn't working

Does this still happen if you switch your site off of down for maintenance to live?

12 Nov 2006, 1:11 AM
#17
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Modifying the <head> because SSL isn't working

It is wierd, because I have two domains on blue host set up the same way only one works correctly. I pointed that out to them and said it was basically user error.

Another thought/question: Do you have 2 individual accounts or is one as an add-on domain?

12 Nov 2006, 1:15 AM
#18
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

same thing...

12 Nov 2006, 1:16 AM
#19
part_timer avatar

part_timer

New Zenner

Join Date:
Oct 2006
Posts:
15
Plugin Contributions:
0

Re: Modifying the <head> because SSL isn't working

2 seperate accounts.

12 Nov 2006, 2:09 AM
#20
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Modifying the <head> because SSL isn't working

Check in CPanel for if you have Hot linking turned on and if perhaps you are excluding your own secure pages or need to add your secure URL to this ...