Index: [Article Count Order] [Thread]

Date:  Tue, 18 Apr 2006 10:36:33 -0400
From:  Brian Rahill <brian (at mark) rainstormconsulting.com>
Subject:  [coba-e:04746] Preview site
To:  coba-e (at mark) bluequartz.org
Message-Id:  <4444F971.7070004 (at mark) rainstormconsulting.com>
X-Mail-Count: 04746

Hi All,

I am having difficulty with the preview site feature in BQ.
I have enabled it and now I see a "preview" file in my:
/etc/httpd/conf/vhosts folder.

However when I try to preview a site, it throws as 404 error.

I am preview sites by going to:
servername.domain.tld/www.example.com/

Apache doesn't seem to be respecting the Alias directive that is in the "preview" file and 
instead looks directly within the primary site for the file.
So I get:
File does not exist: /home/.sites/28/site1/web/www.example.com/


Where: /home/.sites/28/site1/web/ is the path to my primary site's web root.


The preview file is below and any help is appreciated:
++++++++++++++++++++++++
# /etc/httpd/conf/vhost/preview
NameVirtualHost XX.XX.XX.XX:80
<VirtualHost XX.XX.XX.XX:80>
ServerName servername.domain.tld
DocumentRoot /var/www/html
RewriteEngine On
RewriteCond %{HTTP_HOST}                ^([^:]+)
RewriteCond %{DOCUMENT_ROOT}            !-d
RewriteRule .*                          http://%1:444/error/forbidden.html [L,R]
RewriteCond %{HTTP_HOST}                ^([^:]+)
RewriteRule ^/admin/?$                 http://%1:444/login.php [L,R]
RewriteCond %{HTTP_HOST}                ^([^:]+)
RewriteRule ^/siteadmin/?$             http://%1:444/login.php [L,R]
RewriteCond %{HTTP_HOST}                ^([^:]+)
RewriteRule ^/personal/?$              http://%1:444/login.php [L,R]
RewriteCond %{HTTP_HOST}                ^([^:]+)
RewriteRule ^/login/?$                 http://%1:444/login.php [L,R]

<Directory /var/www/html>
Options +MultiViews
</Directory>

Alias /no-vhost-error/ /usr/sausalito/ui/web/error/
ErrorDocument 401 /no-vhost-error/authorizationRequired.html
ErrorDocument 403 /no-vhost-error/forbidden.html
ErrorDocument 404 /no-vhost-error/fileNotFound.html
ErrorDocument 500 /no-vhost-error/internalServerError.html
Alias /servername.domain.tld/ /home/.sites/28/site1/web/
<Directory /home/.sites/28/site1/web>
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php

</Directory>
Alias /www.example.com/ /home/.sites/148/site6/web/
<Directory /home/.sites/148/site6/web>

</Directory>
Alias /www.example2.org/ /home/.sites/112/site7/web/
<Directory /home/.sites/112/site7/web>
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php

</Directory>
Alias /www.example3.org/ /home/.sites/33/site5/web/
<Directory /home/.sites/33/site5/web>

</Directory>

</VirtualHost>

++++++++++++++++++++++++

Thanks!


Brian