Url vs install directory - how to configure

Author Message

George P.

Monday 07 April 2003 7:13:37 am

I installed a test ezpublish in a directory called "portal" which lies in document-root ( html_public/portal/ )

My intention is that users will reach ezpublish by typing only
www.MyDomain.com
or even (I found documentation for multiple site)
http://sub.MyDomain.com
www.MyDomain2.com

How can I achieve this? Redirection? Or must index.htm lie directly in the www-root (no subdir "/portal" also)?

Normally I must type www.MyDomain.com/portal/ to reach the installed ezpublish.
Please someone help me with an simple example.

Gunnstein Lye

Monday 07 April 2003 7:47:33 am

This is very simple, use something like this in your apache config:

<VirtualHost www.MyDomain.com>
<Directory /var/www/html/ezpublish/>
Options FollowSymLinks Indexes ExecCGI
AllowOverride None
</Directory>

RewriteEngine On
RewriteRule !\\.(gif|css|jpg|png|js)$ /var/www/html/ezpublish/index.php

ServerAdmin root@localhost
DocumentRoot /var/www/html/ezpublish/
ServerName www.MyDomain.com
</VirtualHost>

George P.

Monday 07 April 2003 8:55:08 am

Thanks!

But is this possible if I use a Web Hotel? I don't think I have access to apache config files. Maybe using .htaccess in stead?

Scot Wilcoxon

Monday 07 April 2003 12:47:28 pm

It's not index.htm which matters, it is index.php. eZp3 looks at the URL and uses everything before the "index.php" as the current directory. If index.php is visible you should be OK.

(I was having trouble with a similar config, but with index.php hidden. There are problems with that -- I posted a suggestion with a possible fix. Have index.php visible.)

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 01:24:29
Script start
Timing: Jan 31 2025 01:24:29
Module start 'layout'
Timing: Jan 31 2025 01:24:29
Module start 'content'
Timing: Jan 31 2025 01:24:29
Module end 'content'
Timing: Jan 31 2025 01:24:29
Script end

Main resources:

Total runtime0.0316 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0062 588.3672151.2266
Module start 'layout' 0.00620.0044 739.5938220.7188
Module start 'content' 0.01060.0188 960.3125997.8672
Module end 'content' 0.02940.0021 1,958.179733.9922
Script end 0.0315  1,992.1719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00278.5097140.0002
Check MTime0.00113.3750140.0001
Mysql Total
Database connection0.00123.880310.0012
Mysqli_queries0.00258.064930.0008
Looping result0.00000.126910.0000
Template Total0.00134.210.0013
Template load0.00103.050310.0010
Template processing0.00031.089810.0003
Override
Cache load0.00061.849510.0006
General
dbfile0.00031.048280.0000
String conversion0.00000.028740.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