Changing DocumentRoot

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Changing DocumentRoot

Postby edevil » 21. May 2005 08:30

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.
edevil
 
Posts: 3
Joined: 21. May 2005 08:14

Postby Wiedmann » 21. May 2005 10:50

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
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby edevil » 21. May 2005 13:24

Thanks a lot Wiedmann. Problem solved :D
edevil
 
Posts: 3
Joined: 21. May 2005 08:14

Postby sckoh » 21. May 2005 13:55

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.
Image
User avatar
sckoh
 
Posts: 67
Joined: 01. March 2005 02:16
Location: Washington DC


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 40 guests