ezPublish 2There's an instruction to virtualize the URL by setting up Apache configuration to run ezPublish here.
Tried to follow what's written there with an example, and this page.
The section for overriding siteaccess method is skipped since it's done in the setting up wizard.
Below is the Apache configuration modified to meet my needs.
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
AcceptPathInfo On
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/ >
AddType application/x-httpd-php .php
DirectoryIndex index.php
Options FollowSymLinks
AllowOverride None
Order allow,deny
allow from all
</Directory>
<IfModule mod_php5.c>
php_admin_flag safe_mode Off
php_admin_value register_globals 0
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime 0
php_value allow_call_time_pass_reference 0
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule content/treemenu/? /index_treemenu.php [L]
Rewriterule ^/var/storage/.* - [L]
Rewriterule ^/var/[^/]+/storage/.* - [L]
RewriteRule ^/var/cache/texttoimage/.* - [L]
# RewriteRule ^/var/[^/]+/cache/public/.* - [L]
RewriteRule ^/var/[^/]+/cache/(texttoimage|public)/.* - [L]
Rewriterule ^/design/[^/]+/(stylesheets|images|javascript)/.* - [L]
Rewriterule ^/share/icons/.* - [L]
# Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascripts?)/.* - [L]
Rewriterule ^/extension/[^/]+/design/[^/]+/(stylesheets|images|javascript|flash|lib?)/.* - [L]
Rewriterule ^/packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
RewriteRule ^/packages/styles/.+/thumbnail/.* - [L]
RewriteRule ^/favicon\.ico - [L]
RewriteRule ^/robots\.txt - [L]
# Uncomment the following lines when using popup style debug.
# RewriteRule ^/var/cache/debug\.html.* - [L]
# RewriteRule ^/var/[^/]+/cache/debug\.html.* - [L]
RewriteRule .* /index.php
</IfModule>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
</VirtualHost>
Actually, the above assumes ezPublish was configured to run under /var/www, which is different from the config shown in the previous post here.
• Wrote Teru at 11:29 (edited 4×, last on 20 Oct 2009) | read 11766× | 16 Comments
icon is the article's permalink.