Where do I put the HTML files I want to view on the server (http://localhost)? For some reason, I'm having a much harder time figuring this out than it seems like I should be.
Thanks,
Jason
Super easy Apache question (newbie)
Moderator: General Moderators
I store the websites on a different harddisk/partition...
DocumentRoot still defaults to c:\program files\apache2\whatever
DocumentRoot still defaults to c:\program files\apache2\whatever
Code: Select all
NameVirtualhost *:80
<VirtualHost *:80>
ServerName localhost
DocumentRoot "e;F:/websites/localhost"e;
<Directory "e;F:/websites/localhost"e;>
AllowOverride All
Options All
</Directory>
</Virtualhost>
<VirtualHost *:80>
ServerName test
DocumentRoot "e;F:/websites/test"e;
<Directory "e;F:/websites/test"e;>
AllowOverride All
Options All
</Directory>
</Virtualhost>This is what I found:Skara wrote:It should say where in your httpd.conf. It's usually /var/www/html.
Find in httpd.conf these lines (the quoted might be different):
DocumentRoot "/var/www/html"
and
<Directory "/var/www/html">
That's where you put it. Or you can change both of those if you like.
DocumentRoot "@exp_htdocsdir@"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
What do the @ symbols mean? What does any of this stuff mean?
Thanks,
Jason
Still doesn't work
I found the one you were talking about and changed it to "/home". I put a file called index.html in my "home" directory. It still didn't work. Here's what happens every time instead:
I go to http://localhost
It has a directory listing consisting of just one directory (apache2-default) which apparently does not exist on my computer.
When I click on the directory name, a page comes up that says something like "Seeing this instead of the page you expected? bla bla bla"
So what am I still doing wrong?
I go to http://localhost
It has a directory listing consisting of just one directory (apache2-default) which apparently does not exist on my computer.
When I click on the directory name, a page comes up that says something like "Seeing this instead of the page you expected? bla bla bla"
So what am I still doing wrong?