Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

total newbie - configuring root dir

Status
Not open for further replies.

madmarius

Technical User
Jul 20, 2006
3
DE
Hi, I installed Apache 2.2.2 under WinXP. I want to run it locally, to test some scripts and such..

Now, I need to specify a root directory, other than the default one ..\Apache2.2\htdocs

I want to make it for example C:\site

So here are some details from httpd.conf:

Listen 80

ServerName localhost

DocumentRoot "C:/site"

<Directory "C:/site">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

DirectoryIndex index.html



basically, when I type localhost in a browser I assume it should look for C:\site\index.html , but even with these settings, it still uses the default path and opens the "It works!" page.

Where am I going wrong?
 
I restarted it after every config change.

For some reason, it seems to work now, without me doing anything... strange...



Anyway so as not to make another thread, here's another question:


I installed php support. Well, almost.

I'm using Apache 2.2.2 and I got the binaries for php5.1.4

I configured everything php-related, copied the .dll's into \windows\system32 and configured php.ini.

now, when I add the

LoadModule php5_module c:/php/php5apache2.dll

to httpd.conf, the php sources being of course in c:/php, when I start the server it says it can't find php5apache2.dll.

The file is indeed in that directory.

Now what?

 
Hi

I am total newbie too. ( Ok, on Windows only. ) Now I installed both Apache and PHP first. Apache from the .msi installer, PHP from the .zip package.

I done the following steps :
[ol]
[li]unpacked php-5.1.4-Win32.zip to c:\Program Files\php[/li]
[li]edited the httpd.conf file
[ul][li]adding the following lines :
Code:
LoadModule php5_module "c:/program files/php/php5apache2.dll"
AddType application/x-httpd-php .php
[/li]
[li]and modifying ths line :
Code:
DirectoryIndex index.html index.html.var index.php
[/li][/ul][/li]
[li]restarted Apache and PHP works[/li]
[/ol]
Oops, now I see a difference. I installed Apache 2.0.0.

Feherke.
 
Right.

I switched to 2.0 and it works. It runs php scripts and everything.

Thanks for the replies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top