Page 1 of 1

Problems with Apache - local host

PostPosted: 12. February 2014 00:46
by emm_lou
Hello,

As there was a conflict I had to change the port used from 80 to 88.

However, it cannot find the XAMPP splash page when I use http://localhost:88.

Although it can find it when I use http://127.0.0.1:88/xampp/.

But I cannot find my htdocs from this to run any of my files.

Can anyone please help me to get localhost:88 to work, or explain how I can use my htdocs from http://127.0.0.1:88/xampp/.


Thank you :)

Re: Problems with Apache - local host

PostPosted: 12. February 2014 00:59
by JJ_Tagy
If 127.0.0.1 works but not localhost, it is possible your Windows hosts file has that line commented out or no entry. If you want to try, your htdocs folder would be http://127.0.0.1:88/ (not xampp as that takes you to the htdocs/xampp folder).

As a side note, you should consider going back to port 80 and find the offending application using 80 and change it.

Re: Problems with Apache - local host

PostPosted: 12. February 2014 01:03
by emm_lou
I did try http://127.0.0.1:88/ but the browser just fills in the xampp after it :S

Do you know how I would find what is using port 80, and how I would stop it?

Re: Problems with Apache - local host

PostPosted: 12. February 2014 01:24
by JJ_Tagy
emm_lou wrote:I did try http://127.0.0.1:88/ but the browser just fills in the xampp after it :S

That's because index.php automatically forwards to XAMPP landing page.

emm_lou wrote:Do you know how I would find what is using port 80, and how I would stop it?

There is a netstat button on the control panel window. Stopping it depends in what is running.

Re: Problems with Apache - local host

PostPosted: 12. February 2014 01:29
by emm_lou
How to I stop it from writing XAMPP after it?

The netstat say: port:80, PID:4, Name:System

Re: Problems with Apache - local host

PostPosted: 12. February 2014 01:40
by JJ_Tagy
It is probably Microsoft IIS. You can remove the it in Control Panel -> Programs and Features -> Turn Windows features on or off.

Open htdocs/index.php in your favorite editor to address the redirection.

Re: Problems with Apache - local host

PostPosted: 12. February 2014 01:48
by emm_lou
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/xampp/');
exit;
?>
Something is wrong with the XAMPP installation :-(

This is my index.php . how do I change it to redirect it??

-------Thank you for your help by the way :)

Re: Problems with Apache - local host

PostPosted: 12. February 2014 02:44
by JJ_Tagy
Edit that page to be whatever you want.

Code: Select all
header('Location: '.$uri.'/xampp/');

is the redirection code.