How do I get the .htaccess file to work or is it okay to run eZ without using the.htaccess file in a non virtual host environment?

Author Message

Maggie Martin

Thursday 29 May 2003 3:05:47 pm

When I upload the .htacess file via Fetch to my directory foo.com for increased security (as recommended in the installation instructions) I get two errors:

"The server cannot fulfill your request"

"the attempt to load "http://www.foo.com failed."

When I delete the file I can once again access the site.

Do I need to change the file in some way?
Is it insecure to run the site without this file in place?

the .htaccess file looks like this:

# Copy this file to a new file called .htaccess in your eZ publish root
# to make the site more secure in non-virtualhost mode (index.php used in urls).
#

<FilesMatch ".">
order allow,deny
deny from all
</FilesMatch>

<FilesMatch "(index\.php|\.(gif|jpe?g|png))$">
order allow,deny
allow from all
</FilesMatch>

RewriteEngine On
RewriteRule !\.(gif|css|jpe?g|png|js)$ index.php

DirectoryIndex index.php

_____________

I have just done a clean install of the 3.1.0 beta (though this happened with the latest 3.0 as well)

Thanks for any guidance ;-)

mikael lindqvist

Tuesday 03 June 2003 10:47:09 am

I have the same problem. I just installed ez 3.1 beta and when I rename the .htaccess_root file to .htaccess I receive following error message when trying to access the site:

Forbidden
You don't have permission to access /ezpublish/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

--------------------------------------------------------------------------------

Apache/1.3.27 Server at www.myportal.se Port 80

What to do?

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 06:16:30
Script start
Timing: Jan 31 2025 06:16:30
Module start 'layout'
Timing: Jan 31 2025 06:16:30
Module start 'content'
Timing: Jan 31 2025 06:16:31
Module end 'content'
Timing: Jan 31 2025 06:16:31
Script end

Main resources:

Total runtime1.1629 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 589.1250151.3359
Module start 'layout' 0.00780.0033 740.460936.8516
Module start 'content' 0.01111.1507 777.3125891.2344
Module end 'content' 1.16180.0010 1,668.54697.6406
Script end 1.1628  1,676.1875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.3024160.0002
Check MTime0.00140.1187160.0001
Mysql Total
Database connection0.00130.107910.0013
Mysqli_queries1.104394.9628540.0205
Looping result0.00050.0460520.0000
Template Total1.116096.020.5580
Template load0.00250.215520.0013
Template processing1.113595.753920.5568
Template load and register function0.00160.134110.0016
states
state_id_array0.00210.181810.0021
state_identifier_array0.00330.284720.0017
Override
Cache load0.00200.1716360.0001
Sytem overhead
Fetch class attribute can translate value0.00090.075820.0004
Fetch class attribute name0.00230.197720.0011
XML
Image XML parsing0.00040.030820.0002
class_abstraction
Instantiating content class attribute0.00000.002820.0000
General
dbfile0.00200.1683100.0002
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 5

Time used to render debug report: 0.0003 secs