Computing.Net > Forums > Linux > Apache Configuration - DocumentRoot

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Apache Configuration - DocumentRoot

Reply to Message Icon

Name: drsmartman
Date: October 12, 2004 at 10:24:59 Pacific
OS: RH AS 3.0
CPU/Ram: Dual P3/1GB
Comment:

hey all,

quick apache question....I'm trying to setup a test server.
changed httpd.conf on the test server to handle a new
site...called 'test2' here is the virtual host configuration for
this....(barely anything there)...also, note the
NameVirtualHost directive.


--- start apache conf ---

NameVirtualHost test2:80

<VirtualHost test2:80>
DocumentRoot /usr/local/apache/htdocs/chnm_test
ServerName chnm_test
ServerAlias chnm2
Alias / /usr/local/apache/htdocs/chnm_test/
</VirtualHost>

--- End apache conf ---

Okay, for some reason the site is still going to the default
'htdocs' directory when I include the NameVirtualHost
Directive...if I take it out, and use the IP or * under the
VirtualHost, the index page of my site loads.

My MAIN problem is this. For some reason, I cannot seem
to access the VirtualHost root directory. I try to do this
using php includes....in the form of '/images/test.gif'
where I want the file under /usr/local/apache/htdocs/
chnm_test/images/test/gif to serve. I also tried using the
alias directive under virtual host to no avail.

Can someone supply a very basic virtual host
configuration that allows for this "site root" accessibility?
Or, is php the problem? I dunno...any help is appreciated..

many thanks as always....



Sponsored Link
Ads by Google

Response Number 1
Name: kalamar
Date: October 13, 2004 at 06:32:10 Pacific
Reply:

Man apache


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: Apache Configuration - DocumentRoot

Setup Apache Web Server www.computing.net/answers/linux/setup-apache-web-server/25048.html

PHP & Apache configuration. www.computing.net/answers/linux/php-amp-apache-configuration/11698.html

again, IIS to Apache www.computing.net/answers/linux/again-iis-to-apache/10033.html