Forums / Install & configuration / Access denied

Access denied

Author Message

Veronique Jamilloux

Tuesday 23 August 2011 9:43:42 am

Hi,

I've 2 sites in the same eZpublish instance (v 4.2), but their content are in the same database because these sites use the same content classes. These sites have their own design.

So I build 2 virtual host and i've 2 urls : urgi.versailles.inra.fr en morgoth.versailles.inra.fr.

In eZpublish,

  • there are 3 siteaccess in directory setting/siteaccess : morgoth, urgi, urgi_admin with there own site.ini.append.php file

setting/siteaccess/morgoth/site.ini.append.php:

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

[DatabaseSettings]
***

[InformationCollectionSettings]
***

[Session]
SessionNamePerSiteAccess=disabled

[SiteSettings]
SiteName=WHEAT
SiteURL=morgoth.versailles.inra.fr
LoginPage=embedded
AdditionalLoginFormActionURL=http://urgi.versailles.inra.fr/index.php/urgi_admin/user/login
RootNodeDepth=2
IndexPage=/content/view/full/1524/
DefaultPage=/content/view/full/1524

[NodeSettings]
RootNode=1524

[UserSettings]
LogoutRedirect=/

[SiteAccessSettings]
RequireUserLogin=false
ShowHiddenNodes=false

[DesignSettings]
SiteDesign=morgoth
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=ezflow
AdditionalSiteDesignList[]=base
AdditionalSiteDesignList[]=standard

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=eng-GB
TextTranslation=disabled

[FileSettings]
VarDir=var
CacheDir=cache

[ContentSettings]
TranslationList=

[SearchSettings]
SearchViewHandling=template

[DebugSettings]
DebugOutput=enabled
DebugRedirection=disabled
[TemplateSettings]
Debug=enabled
ShowXHTMLCode=disabled
ShowUsedTemplates=enabled
*/ ?>

setting/siteaccess/urgi/site.ini.append.php :

 

<?php /* #?ini charset="utf-8"?
[DatabaseSettings]
****
[InformationCollectionSettings
****]
[Session]
SessionNamePerSiteAccess=disabled

[SiteSettings]
SiteName=URGI
SiteURL=urgi.versailles.inra.fr
LoginPage=embedded
AdditionalLoginFormActionURL=http://morgoth.versailles.inra.fr/index.php/urgi_admin/user/login
RootNodeDepth=2
IndexPage=/content/view/full/1523/
DefaultPage=/content/view/full/1523

[NodeSettings]
RootNode=1523

[UserSettings]
LogoutRedirect=/

[SiteAccessSettings]
RequireUserLogin=false
ShowHiddenNodes=false

[DesignSettings]
SiteDesign=urgi
AdditionalSiteDesignList[]=ezwebin
AdditionalSiteDesignList[]=ezflow
AdditionalSiteDesignList[]=base
AdditionalSiteDesignList[]=standard

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
ShowUntranslatedObjects=disabled
SiteLanguageList[]
SiteLanguageList[]=eng-GB
TextTranslation=disabled

[FileSettings]
VarDir=var
CacheDir=cache

[ContentSettings]
TranslationList=

[SearchSettings]
SearchViewHandling=template

[DebugSettings]
DebugOutput=disabled
DebugRedirection=disabled

[TemplateSettings]
Debug=disabled
ShowXHTMLCode=disabled
ShowUsedTemplates=disabled
*/ ?>

setting/siteaccess/urgi_admin/site.ini.append.php :

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

[DatabaseSettings]
****

[InformationCollectionSettings]
EmailReceiver=

[SiteSettings]
SiteName=URGI
SiteURL=urgi.versailles.inra.fr
LoginPage=custom

[UserSettings]
RegistrationEmail=

[SiteAccessSettings]
RequireUserLogin=true
RelatedSiteAccessList[]=urgi
RelatedSiteAccessList[]=urgi_admin
RelatedSiteAccessList[]=eng
RelatedSiteAccessList[]=iphone
ShowHiddenNodes=true

[DesignSettings]
SiteDesign=urgi_admin
AdditionalSiteDesignList[]=admin
AdditionalSiteDesignList[]=ezflow

[RegionalSettings]
Locale=eng-GB
ContentObjectLocale=eng-GB
ShowUntranslatedObjects=enabled
SiteLanguageList[]=eng-GB
TextTranslation=disabled

[FileSettings]
VarDir=var/ezflow_site

[ContentSettings]
CachedViewPreferences[full]=admin_navigation_states=0;admin_navigation_content=0;admin_navigation_details=0;admin_navigation_languages=0;admin_navigation_locations=0;admin_navigation_relations=0;admin_navigation_roles=0;admin_navigation_policies=0;admin_navigation_content=0;admin_navigation_translations=0;admin_children_viewmode=list;admin_list_limit=1;admin_edit_show_locations=0;admin_leftmenu_width=10;admin_url_list_limit=10;admin_url_view_limit=10;admin_section_list_limit=1;admin_orderlist_sortfield=user_name;admin_orderlist_sortorder=desc;admin_search_stats_limit=1;admin_treemenu=1;admin_bookmarkmenu=1;admin_left_menu_width=13
TranslationList=

[MailSettings]
AdminEmail=veronique.jamilloux@versailles.inra.fr
EmailSender=veronique.jamilloux@versailles.inra.fr

[DebugSettings]
DebugOutput=disabled
DebugRedirection=disabled

[TemplateSettings]
Debug=disabled
ShowXHTMLCode=disabled
ShowUsedTemplates=disabled
*/ ?>

In the setting/override/site.ini.append.php :

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

[ExtensionSettings]
ActiveExtensions[]=cjw_newsletter
ActiveExtensions[]=ezflow
ActiveExtensions[]=ezgmaplocation
ActiveExtensions[]=ezjscore
ActiveExtensions[]=ezodf
ActiveExtensions[]=ezoe
ActiveExtensions[]=ezstarrating
ActiveExtensions[]=ezwebin
ActiveExtensions[]=ezwt
ActiveExtensions[]=recaptcha
ActiveExtensions[]=wordCut
ActiveExtensions[]=wrap_operator

[Session]
SessionNameHandler=custom

[SiteSettings]
DefaultAccess=urgi
SiteList[]=urgi
SiteList[]=urgi_admin
SiteList[]=morgoth
SiteList[]=eng
SiteList[]=iphone

[UserSettings]
LogoutRedirect=/

[SiteAccessSettings]
CheckValidity=false
AvailableSiteAccessList[]=urgi
AvailableSiteAccessList[]=morgoth
AvailableSiteAccessList[]=urgi_admin
AvailableSiteAccessList[]=eng
AvailableSiteAccessList[]=iphone
MatchOrder=uri;host
HostMatchMapItems[]
HostMatchMapItems[]=urgi.versailles.inra.fr;urgi
HostMatchMapItems[]=morgoth.versailles.inra.fr;morgoth
HForceVirtualHost=true
RemoveSiteAccessIfDefaultAccess=enabled

[RegionalSettings]
TranslationSA[eng]=Eng

[FileSettings]
VarDir=var
CacheDir=cache

[MailSettings]
Transport=sendmail
AdminEmail=veronique.jamilloux@versailles.inra.fr
EmailSender=
ContentType=text/html

[EmbedViewModeSettings]
AvailableViewModes[]=embed
AvailableViewModes[]=embed-inline
InlineViewModes[]=embed-inline

[DebugSettings]
DebugByIP=disabled

[ContentSettings]
ViewCaching=enabled

[TemplateSettings]
TemplateCache=enabled
TemplateCompile=enabled

[SearchSettings]
MinCharacterWildcard=2
*/ ?>
  • There are 3 designs design/morgoth, design/urgi and design/urgi_admin
  • The content tree is :
    • Home (objectId : 2)
      • Home URGI (objectId : 1523) --> in standard section
        • folder1
        • folder2
        • folder3
      • Home Mrogoth(objectId : 1524) --> in standard section
        • folderA
        • folderB

My problem :

  • when I use the url urgi.versailles.inra.fr it's ok I see the URGI home page
  • when I use the url morgoth.versailles.inra.fr I've the 'access denied' error. I need to login to see the morgoth home page.

I don't understand why?

Thank you for your help.

Bye

Véronique

URGI - INRA
Webmaster
Route de Saint Cyr
78000 Versailles

Ivo Lukac

Tuesday 23 August 2011 10:14:29 am

Open /urgi_admin/role/view/1 and check if you have the policy:

user login SiteAccess( morgoth )

If not add it.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Hamdi Laadhari

Wednesday 24 August 2011 12:49:30 am

As stated above you have first to allow the anonymous user (through his role) to log into that siteacess

Watch your logs, and you'll see something related to "Insufficient policy"

Certified eZ Publish Entreprise 4.5
http://www.laadhari.fr

Veronique Jamilloux

Wednesday 24 August 2011 8:45:52 am

Thank you very much Ivo, I do your solution and the morgoth site access is ok now.

Two more questions :

  • With my new content tree, when I use urgi.versailles.inra.fr/Tools eZpublish rewrite it like urgi.versailles.inra.fr/Home-URGI/Tools. This the same for morgoth.versailles.inra.fr/index.php/Tools eZpublish  rewrite it like morgoth.versailles.inra.fr/index.php/Home-Morgoth/Tools.

How can can I hide the name of the home pages?

  • How can I hide the 'index.php' in the morgoth url? Morgoth is not the default site access?

Thanks again for your help.

Véronique

URGI - INRA
Webmaster
Route de Saint Cyr
78000 Versailles

Ivo Lukac

Wednesday 24 August 2011 9:01:38 am

"

Two more questions :

  • With my new content tree, when I use urgi.versailles.inra.fr/Tools eZpublish rewrite it like urgi.versailles.inra.fr/Home-URGI/Tools. This the same for morgoth.versailles.inra.fr/index.php/Tools eZpublish  rewrite it like morgoth.versailles.inra.fr/index.php/Home-Morgoth/Tools.

How can can I hide the name of the home pages?

  • How can I hide the 'index.php' in the morgoth url? Morgoth is not the default site access?
"

For hiding index.php you need to force virtual host setting, check it here:
http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/SiteAccessSettings/ForceVirtualHost
But be careful, you will need to setup different rewrite rules

For hiding root node part of the url use this:
http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Configuration-files/site.ini/SiteAccessSettings/PathPrefix

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Veronique Jamilloux

Wednesday 24 August 2011 10:00:13 am

Thanks again for your help Ivo

Ok for the PathPrefix.

On apache server, my two sites are virtualhost and there are rewrite rules and I've in settings/override.site.ini.append.php RemoveSiteAccessIfDefaultAccess=enabled in the [SiteAccessSettings].

If I put ForceVirtualHost=true I must delete RemoveSiteAccessIfDefaultAccess ?

URGI - INRA
Webmaster
Route de Saint Cyr
78000 Versailles

Ivo Lukac

Wednesday 24 August 2011 10:10:29 am

"

Ok for the PathPrefix.

On apache server, my two sites are virtualhost and there are rewrite rules and I've in settings/override.site.ini.append.php RemoveSiteAccessIfDefaultAccess=enabled in the [SiteAccessSettings].

If I put ForceVirtualHost=true I must delete RemoveSiteAccessIfDefaultAccess ?

"

ForceVirtualHost=true removes /index.php/ but needs rewrites to properly work.

RemoveSiteAccessIfDefaultAccess has nothing to do with ForceVirtualHost, so you can leave it.

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Veronique Jamilloux

Thursday 25 August 2011 1:45:50 am

I do it and the urls are nice.

Thanks and have a nice day

URGI - INRA
Webmaster
Route de Saint Cyr
78000 Versailles

eZ debug

Timing: Jan 17 2025 20:51:27
Script start
Timing: Jan 17 2025 20:51:27
Module start 'content'
Warning: PHP: E_DEPRECATED Jan 17 2025 20:51:28
trim(): Passing null to parameter #1 ($string) of type string is deprecated in /home/ze/public_html/share.se7enx.com/var/community/cache/template/compiled/table-c0a31fef795ad927ef08940ddf2d392f.php on line 147
Timing: Jan 17 2025 20:51:28
Module end 'content'
Timing: Jan 17 2025 20:51:29
Script end

Main resources:

Total runtime1.2193 sec
Peak memory usage4,096.0000 KB
Database Queries212

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 597.1563180.8516
Module start 'content' 0.00521.0839 778.0078761.8516
Module end 'content' 1.08910.1300 1,539.8594353.5156
Script end 1.2192  1,893.3750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.3248210.0002
Check MTime0.00150.1223210.0001
Mysql Total
Database connection0.00060.052410.0006
Mysqli_queries1.091389.50862120.0051
Looping result0.00200.16612100.0000
Template Total1.190797.720.5953
Template load0.00180.146920.0009
Template processing1.188997.506920.5944
Template load and register function0.00020.015510.0002
states
state_id_array0.00080.063610.0008
state_identifier_array0.00180.147720.0009
Override
Cache load0.00200.16141570.0000
Sytem overhead
Fetch class attribute can translate value0.00120.095340.0003
Fetch class attribute name0.00100.0854100.0001
XML
Image XML parsing0.00360.298140.0009
class_abstraction
Instantiating content class attribute0.00000.0030150.0000
General
dbfile0.00460.3782340.0001
String conversion0.00000.000330.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
34content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/strong.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/strong.tplEdit templateOverride template
13content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
12content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
16content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/td.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/td.tplEdit templateOverride template
1content/datatype/view/ezxmltags/tr.tpl<No override>extension/community/design/community/templates/content/datatype/view/ezxmltags/tr.tplEdit templateOverride template
1content/datatype/view/ezxmltags/table.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/table.tplEdit templateOverride template
2content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
2content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 110
 Number of unique templates used: 15

Time used to render debug report: 0.0002 secs