Page 1 of 1

Changing DocumentRoot

PostPosted: 21. May 2005 08:30
by edevil
I wanted to change the document root of Apache from C:/XAMPP/xampp/htdocs to C:/www

I changed httpd.conf accordingly and its working.

But if i enter http://localhost/ in the browser, it takes me to http://localhost/xampp/splash.php and it gives me a 404

But when i enter httpo://localhost/index.php, it works.

I want this auto-redirection stopped.

and oh, the DocRoot has changed only for http. The https link still takes me to C:/XAMPP/xampp/htdocs

Please tell me how to configure httpd.conf to get it fully working.

Thanks in advance.

PostPosted: 21. May 2005 10:50
by Wiedmann
But if i enter http://localhost/ in the browser, it takes me to http://localhost/xampp/splash.php and it gives me a 404

Clear your browser cache.

and oh, the DocRoot has changed only for http. The https link still takes me to C:/XAMPP/xampp/htdocs

--> ssl.conf

PostPosted: 21. May 2005 13:24
by edevil
Thanks a lot Wiedmann. Problem solved :D

PostPosted: 21. May 2005 13:55
by sckoh
You can do like this.
apache/conf/httpd.conf :
If you have www, excel, xampp, ... folders in htdocs, Root is htdocs.
Code: Select all
DocumentRoot "/xampp/htdocs"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/xampp/htdocs">
    Options Indexes FollowSymLinks MultiViews Includes ExecCGI
   AddType text/html .shtml
        AddHandler server-parsed .shtml
        AddHandler cgi-script .cgi .pl
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

xampp/htdocs/index.html
Code: Select all
<html>
<head>
<meta name="author" content="Kai Oswald Seidler, Kay Vogelgesang">
<!--- <meta http-equiv="refresh" content="0;url=/xampp/splash.php"> -->
<meta http-equiv="refresh" content="0;url=/www/index.php">
</head>
<body bgcolor=#ffffff>
</body>
</html>

I'd like to remind you that any server installed to OS DRIVE is very dangerous and makes you big headache in future, if computor is hang or sombody try illigal access remotely.

Therfore, mosts of advanced users install any server on D, E,.... Drive.
Take care.