httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Burden" <...@Burden.ca>
Subject Re: [users@httpd] Virtual Hosts - What am I doing wrong?
Date Tue, 08 Jun 2004 23:17:11 GMT
What  is the purpose of this line?
$_SERVER['DOCUMENT_ROOT'] .= '/freedomware';

I'm pretty sure you just set your global to c:/sites/freedomware/freedomware
and so it's no wonder you have to back up the tree a notch.

----- Original Message ----- 
From: "David Blomstrom" <david_blomstrom@yahoo.com>
To: <users@httpd.apache.org>
Sent: Tuesday, June 08, 2004 7:06 PM
Subject: [users@httpd] Virtual Hosts - What am I doing wrong?


> I thought I had successfully set up virtual hosts, but
> it can't be right, because the php include links below
> won't work without the extra path segment (../):
>
> <?php
> $_SERVER['DOCUMENT_ROOT'] .= '/freedomware';
> include
> ($_SERVER['DOCUMENT_ROOT']."/../includes/head.php");
> ?>
> </head>
> <body>
> <?php include
> ($_SERVER['DOCUMENT_ROOT']."/../includes/top.php"); ?>
>
> The last line SHOULD read <?php include
> ($_SERVER['DOCUMENT_ROOT']."/includes/top.php"); ?>,
> right?
>
> But I can't figure out what I did wrong. Let's start
> with my set up. Below are all the relevant paths\
>
> C:/xampp/apache/
> C:/xampp/htdocs/
> C:/sites/mysites
>
> Below are the first few entries on my httpd conf file:
>
> <VirtualHost 127.0.0.1>
> ServerAdmin admin@localhost
> DocumentRoot "c:/sites"
> ServerName localhost
> ErrorLog logs/localhost_error.log
> CustomLog logs/localhost_access.log common
> </VirtualHost>
>
> <VirtualHost 127.0.0.1>
> ServerAdmin webmaster@1
> DocumentRoot "c:/sites/1"
> ServerName 1
> ServerAlias *.1
> ErrorLog logs/1-error.log
> ScriptAlias /cgi-bin/ "c:/sites/1/cgi-bin/"
> <Directory "c:/sites/1">
> Options All Includes Indexes
> </Directory>
> </VirtualHost>
>
> <VirtualHost 127.0.0.1>
> ServerAdmin webmaster@geobop
> DocumentRoot "c:/sites/geobop"
> ServerName geobop
> ServerAlias *.geobop
> ErrorLog logs/geobop-error.log
> ScriptAlias /cgi-bin/ "c:/sites/geobop/cgi-bin/"
> <Directory "c:/sites/geobop">
> Options All Includes Indexes
> </Directory>
> </VirtualHost>
>
> For some reason, c:/sites/1 doesn't work, but all my
> other sites work. For example, I can preview
> c:/sites/geobop at http://geobop/ But the include
> links require that extra ../
>
> It occurred to me that the first block of code might
> not belong, so I deleted it...
>
> <VirtualHost 127.0.0.1>
> ServerAdmin admin@localhost
> DocumentRoot "c:/sites"
> ServerName localhost
> ErrorLog logs/localhost_error.log
> CustomLog logs/localhost_access.log common
> </VirtualHost>
>
> Now, if I type in http://geobop/, http://freedomware/
> or any other site, I get a different page; it appears
> to be the index page in the folder sites.
>
> So what am I doing wrong? I don't mind include links
> with an extra ../. They appear to work both locally
> and online. I'm just concerned that I'll eventually
> run into trouble if they're incorrect.
>
> Thanks.
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message