Loren wrote:
In my httpd.conf file I have tried this

DocumentRoot "C:\website"
Alias C:/website /home/mydomain/public_html/
<Directory "/home/mydomain/public_html/">
Order allow,deny
Allow from all
</Directory>

which does not work

Mark wrote:

there is an extra space between webite/home:

te /home

I was looking at
http://www.chrisranjana.com/apache-documentation/mod/mod_alias.html
and was (blindly) trying to use examples.
I was not sure what I needed but have never let that stand in my way ;-)


You didn't mention which version of Apache you are using, it's usually
important, following for 2.0 not using aliases, but virtual hosts instead
for a development server on a local box.

I have been using the same version of apache for localhost for years (about the same time php4 was released) and is version <cough-mumble> Apache/1.3.14 (Win32)
um . . . maybe I should upgrade.


This goes above your VH directives:

NameVirtualHost *:80

then:

<VirtualHost *:80>
   ServerAdmin [EMAIL PROTECTED]
   DocumentRoot C:/website/home/mydomain/public_html/
   ServerName yourvirtualdomain.com (don't use the "www")
   ErrorLog logs/dummy-host.example.com-error_log
   CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

This is what I think is needed and when I get a break will give it a try and let you know Thank you very much. I have many VH directives and have previously set up doc root to
c:/website/
and server name similar to what you have above.

I currently get the error with php.
"failed opening file in C:/website/mydomain/script.php"

with the above example will I get the error.
"failed opening file in C:/website/home/mydomain/public_html/script.php" ?

I really want the error to look like.
"failed opening file in /home/mydomain/public_html/script.php"
which may not be possible but will try this when I get time.

I have a big job coming up and will need to use "/home/mydomain/public_html/include.htm" in my includes so I can test locally and on the www server without running two versions.


In your Windows hosts file, add the domain name:

127.0.0.1 localhost yourvirtualdomain.com

When I first set up VH it took a while to find out that the virtual domain also needed to be added to the hosts file. (with no cr/lf at the end)


Restart Apache, you should be good to go. Access the local file by by not
using the www:
http://yourvirtualdomain.com and the live one with:
http://www.yourvirtualdomain.com

Aliases not needed now, includes work as expected, least ways that's how I
do it, works for me etc. :-)

Most problems can be figured out within the error logs for Apache, if this
isn't a typo as I suspect, then check those, and get back to the list with
the error(s) reported, much more helpful and not as much guessing.

there is nothing in the error logs except my deliberate errors.


hth!


cheers,

       Mark

Thank you.
Ill let you know how it goes.
Regards
Loren Wolsiffer



____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] or
use the web interface http://e-newsletters.internet.com/discussionlists.html/
      Send Your Posts To: [email protected]
To change subscription settings, add a password or view the web interface:
http://intm-dl.sparklist.com/read/?forum=wdvltalk

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to