Index: [Article Count Order] [Thread]

Date:  Sun, 28 May 2006 15:18:59 -0400
From:  "Darrell D. Mobley" <dmobley (at mark) uhostme.net>
Subject:  [coba-e:05436] Re: Preview site feature
To:  <coba-e (at mark) bluequartz.org>
Message-Id:  <000d01c6828b$92e8c070$6400a8c0@COMPUTER8SD7ER2>
In-Reply-To:  <109192611.20060526130413 (at mark) post.com>
X-Mail-Count: 05436

My experience with the site preview function is that by default, the preview
feature is configured with the primary site's domain name.  This conflicts
with the httpd configuration because it defines a web server with the same
name using two different document roots.

What I did to make mine work was to edit the
'/etc/httpd/conf/vhosts/preview' file and change the "ServerName" from
"www.primarydomain.com" to "preview.primarydomain.com" and then add a DNS A
record entry for "preview.primarydomain.com" using the same IP address that
was listed in the 'preview' configuration file.  Restart /etc/init.d/httpd
and it's ready to go.  

Be sure to add the trailing slash to the domain name being previewed, so
that it looks like:

http://preview.primarydomain.com/www.somesite.com/


> -----Original Message-----
> From: e.a (at mark) post.com [mailto:e.a (at mark) post.com]
> Sent: Friday, May 26, 2006 8:04 AM
> To: Maurice de Laat
> Subject: [coba-e:05406] Re: Preview site feature
> 
> Hello,
> 
> In /etc/httpd/conf/vhosts/preview , I have :
> 
> NameVirtualHost 216.194.67.218:80
> <VirtualHost 216.194.67.218:80>
> ServerName bq2.lusodigital.net
> 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 /bq2.lusodigital.net/ /home/.sites/28/site1/web/
> <Directory /home/.sites/28/site1/web>
> AddType application/x-httpd-php .php4
> AddType application/x-httpd-php .php
> AddHandler cgi-wrapper .cgi
> AddHandler cgi-wrapper .pl
> AddHandler server-parsed .shtml
> AddType text/html .shtml
> 
> </Directory>
> Alias /www.gicsal.com/ /home/.sites/70/site4/web/
> <Directory /home/.sites/70/site4/web>
> AddType application/x-httpd-php .php4
> AddType application/x-httpd-php .php
> AddHandler cgi-wrapper .cgi
> AddHandler cgi-wrapper .pl
> AddHandler server-parsed .shtml
> AddType text/html .shtml
> 
> </Directory>
> Alias /www.bq2bq2.com/ /home/.sites/143/site2/web/
> <Directory /home/.sites/143/site2/web>
> AddType application/x-httpd-php .php4
> AddType application/x-httpd-php .php
> AddHandler cgi-wrapper .cgi
> AddHandler cgi-wrapper .pl
> AddHandler server-parsed .shtml
> AddType text/html .shtml
> 
> </Directory>
> Alias /www.testecom.com/ /home/.sites/106/site3/web/
> <Directory /home/.sites/106/site3/web>
> AddType application/x-httpd-php .php4
> AddType application/x-httpd-php .php
> AddHandler cgi-wrapper .cgi
> AddHandler cgi-wrapper .pl
> AddHandler server-parsed .shtml
> AddType text/html .shtml
> 
> </Directory>
> 
> </VirtualHost>
> 
> 
> --
> 
> Very best Regards
> 
> Emmanuel
> 
> 
> 
> MdL> On Sat, May 20, 2006 at 01:26:11AM +0100, e.a (at mark) post.com wrote:
> 
> >> >> When I try to preview www.DOMAIN.COM I get in error_log :
> >> >> > File does not exist: /home/.sites/28/site1/web/www.DOMAIN.COM
> >>
> >> MdL> For preview to function, the URL you browse to needs a trailing /
> >>
> >> Ending with / does't help ... I get the same "File Not Found"
> >>
> >> Any idea ?
> 
> MdL> What is in your /etc/httpd/conf/vhosts/preview?
>