Jump to content


Photo
- - - - -

XAMPP Configuration


  • Please log in to reply
2 replies to this topic

#1 Famicoman

Famicoman

    SUP3R 31337

  • Members
  • 163 posts
  • Gender:Male
  • Location:Philly

Posted 13 November 2006 - 05:16 PM

I recently threw xampp onto my server because everyone likes Apace, and I wanted to check it out to see if I prefered it over Abyss. I have successfully changed my port, and got it all configured nicely except for one thing. Whenever I want to go to:

http://localhost

it always redirects to:

http://localhost/xampp/

I want to get rid of that part, so it just goes to the main page in the htdocs folder. I have scowered the Config file, but have not found where to edit this part out. Any help would be appreciated.

Edited by Famicoman, 13 November 2006 - 05:18 PM.


#2 jabzor

jabzor

    hax?

  • Agents of the Revolution
  • 1,146 posts
  • Country:
  • Gender:Male
  • Location:Northern Elbonia, fighting the lefties

Posted 13 November 2006 - 07:52 PM

I was bored so I installed XAMPP just for you. :lol:

XAMPP default install dir is: %ProgramFiles%\xampp\
The xampp default Apache dir is %ProgramFiles%\xampp\apache\
The xampp default Apache config is %ProgramFiles%\xampp\apache\conf\httpd.conf
The xampp default Apache config also references an additional xampp config: %ProgramFiles%\xampp\apache\conf\extras\httpd-xampp.conf
The xampp default Apache DocumentRoot is %ProgramFiles%/xampp/htdocs

Within the htdocs folder are 2 files of interest to you:
index.html & index.php
The index.html displays simply 'It works!' while the php file:
<?php
	if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
		$uri = 'https://';
	} else {
		$uri = 'http://';
	}
	$uri .= $_SERVER['HTTP_HOST'];
	header('Location: '.$uri.'/xampp/');
	exit;
?>
As you can see, redirects your request for localhost into localhost/xampp/,
\%ProgramFiles%\xampp\htdocs\xampp\index.php

The easiest way to fix this is to just rename the htdocs\index.php to htdocs\index.php.x and your index.html will take precidence. :)

#3 Famicoman

Famicoman

    SUP3R 31337

  • Members
  • 163 posts
  • Gender:Male
  • Location:Philly

Posted 13 November 2006 - 08:33 PM

Thanks very much




BinRev is hosted by the great people at Lunarpages!