Server defaults to XAMPP's index page. How to change it?

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

Server defaults to XAMPP's index page. How to change it?

Postby brduran » 13. June 2008 05:17

If I type the static IP of the server, it defaults to XAMPP's index page instead of one of the websites hosted. How or where can I change that?

Thank you.
brduran
 
Posts: 22
Joined: 13. June 2008 03:13

Postby Wiedmann » 13. June 2008 11:20

instead of one of the websites hosted.

You are using VHosts? Or where is the location from there these websites?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby brduran » 13. June 2008 17:13

Wiedmann wrote:
instead of one of the websites hosted.

You are using VHosts? Or where is the location from there these websites?


Yes, I'm using "httpd-vhosts" and all websites are under "htdocs" in XAMPP.

"httpd-vhosts" is set up as follows:
-------------------------------------------------------------------------------
# Use name-based virtual hosting.
#
NameVirtualHost 127.0.0.1:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any <VirtualHost> block.
#
<VirtualHost 127.0.0.1:80>
ServerName localhost
DocumentRoot c:\xampp\htdocs
</VirtualHost>

<VirtualHost 127.0.0.2:80>
ServerName zingout.server.com
DocumentRoot c:\xampp\htdocs\www\zingout
ServerAlias www.zingout.server.com
ServerAdmin webmaster@local.zingout.com
ErrorLog c:\xampp\apache\logs\zingout-error.log
CustomLog c:\xampp\apache\logs\zingout-access.log common
</VirtualHost>

<VirtualHost 127.0.0.3:80>
ServerName teknician.server.com
DocumentRoot c:\xampp\htdocs\www\teknician
ServerAlias www.teknician.server.com
ServerAdmin webmaster@local.teknician.com
ErrorLog c:\xampp\apache\logs\teknician-error.log
CustomLog c:\xampp\apache\logs\teknician-access.log common
</VirtualHost>
---------------------------------------------------------------------------------

I also included the following in Windows "host":

127.0.0.1 localhost
127.0.0.2 zingout.server.com
127.0.0.3 teknician.server.com

Any ideas?

Thank you.
brduran
 
Posts: 22
Joined: 13. June 2008 03:13

Postby Wiedmann » 13. June 2008 17:30

1st one question:
Want you have ip- or name-based vhosts?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby brduran » 13. June 2008 17:46

Wiedmann wrote:1st one question:
Want you have ip- or name-based vhosts?


1. Whichever works best and it's more manageable and transportable. What do yo recommend?
2. At the begining I couldn't get it to work using either, so I used both. But the defaultpage is XAMPP's index.

Thank you.
brduran
 
Posts: 22
Joined: 13. June 2008 03:13

Postby Wiedmann » 13. June 2008 17:50

Whichever works best

Both, or this depends on your requirements ;-)

and it's more manageable and transportable.

Well, on most hosts (root/managed servers) you have only one ip, so most people are using name based vhosts.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby brduran » 13. June 2008 19:18

Wiedmann wrote:
Whichever works best

Both, or this depends on your requirements ;-)

and it's more manageable and transportable.

Well, on most hosts (root/managed servers) you have only one ip, so most people are using name based vhosts.


Thank you guys, but my original question is "How to stop or change the default page when someone tupes my Static IP?

Thank you
brduran
 
Posts: 22
Joined: 13. June 2008 03:13

Postby Wiedmann » 13. June 2008 19:38

"How to stop or change the default page when someone tupes my Static IP?

If the ip from the request is the ip of a namebased vhost group, the access goes to the first vhost in this group.

With ip based vhosts, each vhost have it's own ip and the request goes to this vhost.


BTW:
It's not clear, which ip of that three ips (127.0.0.1-3) did you mean with your static ip?

(It can be also a problem, that you are using 127.0.0.1-3. Because very often 127.0.0.2-3 is the same as 127.0.0.1.)
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby brduran » 13. June 2008 19:57

Wiedmann wrote:BTW:
It's not clear, which ip of that three ips (127.0.0.1-3) did you mean with your static ip?


Instead of dynamic we have 2 static IPs, given by my ISP. On one of them (http://75.155.161.123) we have the XAMPP Server on a Windows XP Pro machine. The other IP is for all the other computers that need access to the internet.

If you click (Copy/Paste) on the Static IP link, then click on Security, you can read something about fixing the problems for mysql, phpmyadmin and the xampp directory by simply using

=> http://localhost/security/xamppsecurity.php <= [allowed only for localhost]

I just don't understand what to do. I open "xamppsecurity.php" and I see 127.0.0.1 at the top, but what to do with it? Is it related to what I'm asking?

From this link you also have access to phpMyAdmin and everything else. I don't want that. I want them to see a website other than XAMPP's index page.

Thank you.
brduran
 
Posts: 22
Joined: 13. June 2008 03:13

Postby Wiedmann » 13. June 2008 22:15

On one of them (http://75.155.161.123) we have the XAMPP Server on a Windows XP Pro machine.

So this ip is assigned to a network interface of this XP box (,or is a NAT router port-forwarding this ip to the server)?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby brduran » 13. June 2008 23:10

Ok, so I switched to "httpd-vhosts" again and got it to work. And I kept only "127.0.0.1 localhost" in "host"

Now whent you enter the IP of the server it shows a different website other than XAMPP' index page.

Thank you.
brduran
 
Posts: 22
Joined: 13. June 2008 03:13

Postby Galdhrim » 16. June 2008 02:44

After digging in every file I could see, I found the problem. index.php was forwarding me to Xampp folder.
Galdhrim
 
Posts: 35
Joined: 28. March 2008 05:20


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 157 guests