[svlug] <VirtualHost> excerpt

Mark msalists at gmx.net
Thu Jul 27 09:49:26 PDT 2006


I haven't seen a VirtualHost with two ServerNames like this before.
I would usually make two separate VirtualHost out of that...

MARK


> -----Original Message-----
> From: svlug-bounces+msalists=gmx.net at lists.svlug.org 
> [mailto:svlug-bounces+msalists=gmx.net at lists.svlug.org] On 
> Behalf Of Skip Evans
> Sent: Thursday, July 27, 2006 8:01 AM
> To: SVLUG
> Subject: [svlug] <VirtualHost> excerpt
> 
> 
> Hey all,
> 
> I have a client whom I set up a development 
> environment for recently. His previous PHP guy was 
> working on the live site, and when I took over I 
> said we'd need a dev site to make changes. So I 
> did that in httpd.conf with a second VirtualHost 
> entry pointing to a parallel install of his site 
> (and a second database). All was well.
> 
> Then he asked his host to install an SSL and when 
> they did that the dev environment began pointing 
> to the production site, making the dev environment 
> inaccessible.
> 
> I found the following in the VirtualHost entries 
> after they did their thing, and it looks to me 
> since they have two <Directory> entries in the 
> same <VirtualHost> entry, the second one replaces 
> the first, hence the result: the dev URL now 
> pointing to production.
> 
> I've marked the directory paths below with 
> comments to make clearer what I suspect.
> 
> I would appreciate opinions on this, because I 
> sent what I thought was happening to the client, 
> who forwarded it on to the tech guy at the host, 
> who replied "Your developer does not know what he 
> is talking about, and should not have access to 
> the httpd.conf file."
> 
> So I'd like a second opinion, (or first since I 
> began with my own). The hosting facility is very 
> slow to respond to any request, and the client 
> pressured me to set up the dev environment.
> 
> It is a dedicated server, by the way, so no one 
> else's sites are in any jeopardy due to my actions.
> 
> 
> 
> <VirtualHost 64.27.5.235:80>
>          ServerName www.development.pixoasis.com
>          ServerAlias www.development.pixoasis.com
> development.pixoasis.com
>          ServerAdmin webmaster at pixoasis.com
> 
> # document root entry for the development environment
> 
>          DocumentRoot /home/development/public_html
>          ScriptAlias /cgi-bin/
> /home/development/public_html/cgi-bin/
> 
>          UseCanonicalName OFF
> 
>          User pixoasis
>          Group pixoasis
>          CustomLog
> /var/log/httpd/domains/pixoasis.com.development.bytes
> bytes
>          CustomLog
> /var/log/httpd/domains/pixoasis.com.development.log
> combined
>          ErrorLog
> /var/log/httpd/domains/pixoasis.com.development.error.log
> 
> 
> # first Directory entry, this one for the dev 
> environment
> 
>          <Directory
> /home/pixoasis/domains/pixoasis.com/public_html/development>
>                  Options +Includes -Indexes
>                  php_admin_flag engine ON
>                  php_admin_flag safe_mode OFF
>                  php_admin_value sendmail_path
> '/usr/sbin/sendmail -t -i -f pixoasis at pixoasis.com'
>        </Directory>
> 
>          ServerName www.pixoasis.com
>          ServerAlias www.pixoasis.com pixoasis.com
>          ServerAdmin webmaster at pixoasis.com
>          DocumentRoot
> /home/pixoasis/domains/pixoasis.com/public_html
>          ScriptAlias /cgi-bin/
> /home/pixoasis/domains/pixoasis.com/public_html/cgi-bin/
> 
>          UseCanonicalName OFF
> 
>          User pixoasis
>          Group pixoasis
>          CustomLog
> /var/log/httpd/domains/pixoasis.com.bytes bytes
>          CustomLog
> /var/log/httpd/domains/pixoasis.com.log combined
>          ErrorLog
> /var/log/httpd/domains/pixoasis.com.error.log
> 
> 
> # second Directory entry, for the production 
> environemt. I think this is the one replacing the 
> dev entry.
> 
>          <Directory
> /home/pixoasis/domains/pixoasis.com/public_html>
>                  Options +Includes -Indexes
>                  php_admin_flag engine ON
>                  php_admin_flag safe_mode OFF
>                  php_admin_value sendmail_path
> '/usr/sbin/sendmail -t -i -f pixoasis at pixoasis.com'
>          </Directory>
> 
> 
> 
>          #php_admin_value open_basedir
> /home/pixoasis/:/tmp/:/var/www/:/usr/local/lib/php/:/etc/virtual/
> 
> </VirtualHost>
> 
> -- 
> Skip Evans
> Big Sky Penguin, LLC
> 61 W Broadway
> Butte, Montana 59701
> 406-782-2240
> 
> _______________________________________________
> svlug mailing list
> svlug at lists.svlug.org
> http://lists.svlug.org/lists/listinfo/svlug
> 





More information about the svlug mailing list