Simple question: how do I setup https for admin side only?

Author Message

Josh Rader

Saturday 13 June 2009 11:20:30 am

I solved the problem in my other post, but I am having problems getting https to work for the admin side of our website. Our admin side of the site is a site access with the name "site_admin". When I go to https://url/site_admin it kicks me back to http://url/site_admin. I tried editing a bunch of different things in the site.ini file, but nothing worked, it still redirects back to http. Here is part of the site.ini.append.php file that is located in the "site_admin" site access folder:


?php /* #?ini charset="utf-8"?

[InformationCollectionSettings]
EmailReceiver=

[SiteSettings]
SiteName=work site
SiteURL=url
LoginPage=custom
SSLPort=443

[UserSettings]
RegistrationEmail=

[SiteAccessSettings]
RequireUserLogin=true
RelatedSiteAccessList[]=site_admin
ShowHiddenNodes=true

[DesignSettings]
SiteDesign=site_admin
AdditionalSiteDesignList[]=admin

[DebugSettings]
DebugOutput=disabled
Debug=inline
DebugRedirection=disabled

[TemplateSettings]
Debug=disabled
ShowXHTMLCode=disabled
ShowUsedTemplates=disabled

[DatabaseSettings]
SQLOutput=disabled

[SSLZoneSettings]
SSLZones=enabled
SSLSubtrees[]=/site_admin

# ModuleViewAccessMode[shop/add]=ssl
# ModuleViewAccessMode[shop/basket]=ssl
#
# Do not remove this line unless you know what you're doing
*/ ?>

I use URI access method.

Questions:

Is 'site_admin' considered an SSLSubtree?
Do I need to do anything with ModuleViewAccessMode settings? I just want everything http://url/site_access to be https. It's not sticking. Thanks.

André R.

Tuesday 23 June 2009 2:32:12 am

"Is 'site_admin' considered an SSLSubtree? "

No, siteaccess is matched and removed from url before the ssl code is even started, so this will never work.
You'll have to use host matching setup and use a seperate sub domain for admin to get this to work correctly.

But..
Did you try using just this for the settings/siteaccess/site_admin settings?

[SSLZoneSettings]
SSLZones=enabled
SSLSubtrees[]=/

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Josh Rader

Thursday 02 July 2009 10:45:50 am

Thanks for the reply, Andre. I got it working. I set the SSLZoneSettings as:

[SSLZoneSettings]
SSLZones=enabled
SSLSubtrees[]=/

Then set each Module as [<module name>/*] =SSL

and it worked.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 03:34:37
Script start
Timing: Jan 31 2025 03:34:37
Module start 'layout'
Timing: Jan 31 2025 03:34:37
Module start 'content'
Timing: Jan 31 2025 03:34:37
Module end 'content'
Timing: Jan 31 2025 03:34:37
Script end

Main resources:

Total runtime0.0271 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.4297151.2422
Module start 'layout' 0.00620.0042 739.6719220.7344
Module start 'content' 0.01040.0149 960.4063998.0234
Module end 'content' 0.02530.0017 1,958.429733.9922
Script end 0.0271  1,992.4219 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002710.0195140.0002
Check MTime0.00113.9806140.0001
Mysql Total
Database connection0.00083.085810.0008
Mysqli_queries0.003713.576430.0012
Looping result0.00000.043910.0000
Template Total0.00134.910.0013
Template load0.00103.709010.0010
Template processing0.00031.139910.0003
Override
Cache load0.00072.488210.0007
General
dbfile0.00238.571180.0003
String conversion0.00000.025540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs