Redirection Problem

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

Redirection Problem

Postby jtsquared » 12. October 2004 18:20

I'm running Xoops v.2 on top of Xampp. I've created my site and it works fine on my machine. However, when I click the home link, it goes to http://localhost and then gets redirected the the Xampp splash page (http://localhost/xampp/splash.php). How do I tell Xampp that http://localhost goes to the index.php file instead of the Xampp splash page? Is it in the Apache configuration or somewhere else?

Thanks,

jT
jtsquared
 
Posts: 10
Joined: 11. October 2004 16:13
Location: TN

Postby Stroke » 12. October 2004 19:33

In /htdocs there is the file "index.html". This one redirects to the xampp-splash page.
So you could change the redirection-url from "/xampp/index.html" (or whatever) to "/index.php". Or you could just delete "index.html".

For method one open "htdocs/index.html" and look for this line of code:
<meta http-equiv="refresh" content="0;url=/xampp/">

There you only have to change /xampp/ to the file you would like to see when you type "localhost" in your browser. For example:

<meta http-equiv="refresh" content="0;url=/index.php">
You don't need a reason to help people.
Stroke
 
Posts: 16
Joined: 12. October 2004 18:05
Location: Deutschland

Better, but not there yet!

Postby jtsquared » 14. October 2004 16:55

Thanks for your help, however I'm still having a little trouble...

I deleted the index.HTML file you specified and changed my virtual host name to my site name (http://didnotreal.daytoncity.net) and now it seems to work for everyone hitting the site from the outside. However on my machine, http://didnotreal.daytoncity.net still gets redirected to the Xampp splash page. This raises a concern of mine. If anyone visits our site that is familiar with xampp, they could type the path to the splash page: http://didnotreal.daytoncity.net/xampp/splash.php and get right into our MySQL configuration page. Please don't destroy me! How can I turn this off and make it secure?

Thanks again,

jT
jtsquared
 
Posts: 10
Joined: 11. October 2004 16:13
Location: TN

Postby Stroke » 14. October 2004 17:37

To prevent this you could just set the "rights". (CHMOD)
Protect the xampp-folder in a way that only the owner (you) can write, read and execute.

You can do this via any FTP-Client (for example WS_FTP).
In most cases you have to type a number with 3 digits.

Type: 700 - this means that only you (the owner) can write, read and execute.
Type: 770 - this means that only you and members of your user-group can write,read + execute

This should protect you against any xampp-familiar persons.
You don't need a reason to help people.
Stroke
 
Posts: 16
Joined: 12. October 2004 18:05
Location: Deutschland

Postby Stroke » 14. October 2004 17:41

By the way, that's not the only security hole.

I can type for example just "http://didnotreal.daytoncity.net/phpmyadmin/".
So i can get access to your MySQL-database without having access to the xampp-folder.
Ergo, you have to protect this folder, too.
You don't need a reason to help people.
Stroke
 
Posts: 16
Joined: 12. October 2004 18:05
Location: Deutschland

Oh no

Postby jtsquared » 14. October 2004 18:11

I appreciate your help Stroke.

I feel like I'm wide open now. I'm running Xampp for Windows. So do I need to go set Windows permissions on every folder besides htdocs?

Thanks again,

jT
jtsquared
 
Posts: 10
Joined: 11. October 2004 16:13
Location: TN

Postby boppy » 14. October 2004 19:19

On windows there are no permissions and there is no CHMod. You have to edit the

x:\xampp\apache\conf\httpd.conf

for your needs. There is an entry for the PHPMyAdmin and for all other stuff. Make a backup of httpd.conf and edit it (AFTER reading the comments!)

best luck


PS: if you like to have a redirect, that works all over the browser-world, try to do it by using PHP. Create a file with following contents:

<?php
header("location: dir/file.ext");
?>

- replace dir/file.ext with the one that fits your needs. It can be:

http://www.apachefriends.org
or
/xampp/
oder
xampp/index.htm

everything what can be in your browsers adress bar will work here!
...in diesem Sinne
yours boppy

Interpunktion und Orthographie dieses Beitrags sind frei erfunden.
Eine Übereinstimmung mit aktuellen oder ehemaligen Regeln wäre rein zufällig und ist nicht beabsichtigt.
User avatar
boppy
AF Moderator
 
Posts: 501
Joined: 27. December 2002 02:15
Location: W-E-City

thanks

Postby jtsquared » 14. October 2004 20:15

Thanks Boppy....I will try this.

jT
jtsquared
 
Posts: 10
Joined: 11. October 2004 16:13
Location: TN

Postby Stroke » 14. October 2004 21:53

Sorry, i completely forgot that you are using windows. :oops: ^^
You don't need a reason to help people.
Stroke
 
Posts: 16
Joined: 12. October 2004 18:05
Location: Deutschland

Postby whitebox » 15. October 2004 04:37

just delete that xampp folder in your htdocs if you site is up and running you don't need it anymore, as far as phpmyadmin access go to your phpmyadmin folder find and open config.inc.php file and change thise line
$cfg['Servers'][$i]['auth_type'] = 'config'; // Authentication method (config, http or cookie based)? into this
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
so this way everytime when you or some1 is trying to acccess your phpmyadmin it will ask for user name and password
i hope this will help you little bit more
http://www.phpcusa.com
whitebox
 
Posts: 7
Joined: 01. October 2004 15:29
Location: Ohio (USA)

Thanks

Postby jtsquared » 15. October 2004 17:10

Thanks guys for all the great help. Sorry this turned into a security discussion, but I benefitted from it nonetheless! With the posts here and the with the other topic "How do I make Xampp secure" I think I have plenty of work to do now!

Thanks again,

jT
jtsquared
 
Posts: 10
Joined: 11. October 2004 16:13
Location: TN


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 77 guests