Forums / Install & configuration / Exclude directory from eZ Web site

Exclude directory from eZ Web site

Author Message

PO Michel

Monday 26 November 2007 1:16:33 am

Hello all,

I have eZPublish 3.8.6 setup on a Apache 2.0 server via a Virtualhost.

I would like to install two HTML files in a subdirectory of the eZ tree and avoid theses pages to be manages by eZ. I would also like to protect access to these files with a HTTP login/pwd.

Here is my Virtualhost setup :

<VirtualHost *:80>
ServerName qualite.tpg.ch
ServerAdmin root@tpg.ch
<Directory "/var/www/tpg">
Options FollowSymLinks Indexes ExecCGI
AllowOverride All
</Directory>
DocumentRoot /var/www/tpg
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
HostNameLookups off
Redirect permanent /tpg/ http://qualite.tpg.ch/
Redirect permanent /index.php/tpg_admin http://qualite.tpg.ch:81
Redirect permanent /phpmyadmin http://anubis:8181
# Rapport Annoni
<Directory "/var/www/tpg/fr/presse/access_securise">
Order Allow,Deny
Allow from All
Options FollowSymLinks -Indexes
AllowOverride All
</Directory>

RewriteEngine On

RewriteRule !(^/fr/presse/access/securise/.*$) - [L]
Rewriterule ^/data/.* - [L]
Rewriterule ^/flash.swf - [L]
Rewriterule ^/var/storage/.* - [L]
Rewriterule ^/var/[^/]+/storage/.* - [L]
RewriteRule ^/var/cache/texttoimage/.* - [L]
RewriteRule ^/var/[^/]+/cache/texttoimage/.* - [L]
Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
Rewriterule ^/share/icons/.* - [L]
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
RewriteRule ^/favicon\.ico - [L]
RewriteRule ^/robots\.txt - [L]
RewriteRule .* /index.php
</VirtualHost>

The directory I want to exclude is /fr/presse/access/securise.

I have setup a .htaccess file at this directory's root :

AuthUserFile /var/www/tpg/fr/presse/acces_securise/.users
AuthGroupFile /dev/null
AuthName "Acces securise"
AuthType Basic
<LIMIT GET POST>
Order deny,allow
Deny from all
Require valid-user
</LIMIT>

When I try to access the URL : http://qualite.tpg.ch/fr/presse/access_securise/NRPE.pdf
, I get a 403 error.

The Apache logs tells :

client denied by server configuration: /var/www/tpg/fr/presse/access_securise

Any idea ?

Many thanks,

PO

Stefan de Bruijn

Monday 26 November 2007 6:47:44 am

The Ez Publish bit seems O.K. to me, and the error is from apache.

I think you should remove:

Order deny,allow
Deny from all

You are denying access from anyone.

PO Michel

Monday 26 November 2007 6:52:36 am

Hi,

I have tried

Order Allow,Deny
Allow from all

and I get the same 403 error after restarting Apache.

Stefan de Bruijn

Monday 26 November 2007 7:08:11 am

But have you tried removing? For combining 2 types of access control, you should use the satisfy directive.
I found some explanation on http://www.egr.msu.edu/decs/web/htaccess.php#combine.

PO Michel

Tuesday 27 November 2007 7:05:14 am

Hi,

I have tried any find of combinatio but I have never prompted for a username and password.

I have a virtual host configured like the following :

<VirtualHost *:80>
ServerName anubis
ServerAdmin root@tpg.ch
#DocumentRoot /DATA1/www/tpgV2
#site 3.8.6
DocumentRoot /var/www/tpg
Alias /fr/presse/acces_securise "http://anubis/access_securise"
ServerSignature email
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
HostNameLookups off
Redirect permanent /tpg/ http://anubis/
Redirect permanent /index.php/tpg_admin http://qualite.tpg.ch:81
Redirect permanent /phpmyadmin http://anubis:8181
<Directory "/var/www/tpg/access_securise">
Order Deny,Allow
Deny from All
Options FollowSymLinks -Indexes
AllowOverride All
</Directory>

</VirtualHost>

And if I access http://anubis/acces_securise/toto.txt, I can read the file.

That is the <Directory> directive is ignored and the .htaccess as well !

It really drives me crazy.

PO

eZ debug

Timing: Jan 18 2025 02:20:03
Script start
Timing: Jan 18 2025 02:20:03
Module start 'content'
Timing: Jan 18 2025 02:20:04
Module end 'content'
Timing: Jan 18 2025 02:20:04
Script end

Main resources:

Total runtime0.9751 sec
Peak memory usage4,096.0000 KB
Database Queries200

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0064 588.9688180.8203
Module start 'content' 0.00640.8136 769.7891514.3359
Module end 'content' 0.82000.1551 1,284.1250338.1016
Script end 0.9751  1,622.2266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00440.4561210.0002
Check MTime0.00160.1610210.0001
Mysql Total
Database connection0.00090.094610.0009
Mysqli_queries0.887991.05912000.0044
Looping result0.00200.20211980.0000
Template Total0.946997.120.4734
Template load0.00220.222620.0011
Template processing0.944796.879420.4723
Template load and register function0.00030.025610.0003
states
state_id_array0.00120.125510.0012
state_identifier_array0.00130.136920.0007
Override
Cache load0.00210.21251070.0000
Sytem overhead
Fetch class attribute can translate value0.00160.159130.0005
Fetch class attribute name0.00150.155250.0003
XML
Image XML parsing0.00050.049230.0002
class_abstraction
Instantiating content class attribute0.00000.001650.0000
General
dbfile0.00220.2278210.0001
String conversion0.00000.000530.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
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs