Web Site Link Redirects me to XAMPP Page. Why?

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

Web Site Link Redirects me to XAMPP Page. Why?

Postby jhavenite » 14. March 2013 22:20

Hi everyone,

I have a couple problems that I need some assistance with:

1) My site was defaulting to the xampp page. To get to my website I had to use the /mysite after my IP address.
To fix this, I changed the "httpd" config file's Document Root to point to C:/xampp/htdocs/mysite instead of just C:/xampp/htdocs
However, by doing this, I now cannot access the xampp page.
How can I make mysite the default while still having access to xampp?


2) How can I restrict access to the phpmyadmin page? I've tried editing "httpd" to deny all and allow my server's IP only but this had to effect.
I used the same logic on the "httpd-xampp" file within the extra folder but then I couldn't access phpmyadmin at all. The code I used was as follows:

AllowOverride AuthConfig (I also tried All instead of AuthConfig)
Order deny,allow
Deny from all
Allow from "my ip address" (without the quotes) (I also tried localhost and 127.0.0.1 but my server was still blocked in each case).

Each time, I receive the following error: AH01630: client denied by server configuration: C:/xampp/phpmyadmin/


Thank you very much for any assistance you can provide.
jhavenite
 
Posts: 5
Joined: 14. March 2013 21:55
XAMPP Version: 5.6.3
Operating System: Windows Server 2003

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby jhavenite » 15. March 2013 02:58

Issue # 1 has been solved but #2 is proving to be very difficult. Any help would be much appreciated...thank you.


How can I restrict access to the phpmyadmin page? I've tried editing "httpd" to deny all and allow my server's IP only but this had to effect.
I used the same logic on the "httpd-xampp" file within the "extra" folder but then I couldn't access phpmyadmin at all. The code I used was as follows:

AllowOverride AuthConfig (I also tried All instead of AuthConfig)
Order deny,allow
Deny from all
Allow from "my ip address" (without the quotes) (I also tried localhost and 127.0.0.1 but my server was still blocked in each case).
jhavenite
 
Posts: 5
Joined: 14. March 2013 21:55
XAMPP Version: 5.6.3
Operating System: Windows Server 2003

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby Altrea » 15. March 2013 05:41

Hi jhavenite,

first: I have separated your posts from then original topic, because of the "one thread per unique user and issue rule".
This makes solving and searching issues a little bit easier.

jhavenite wrote:1) My site was defaulting to the xampp page. To get to my website I had to use the /mysite after my IP address.
To fix this, I changed the "httpd" config file's Document Root to point to C:/xampp/htdocs/mysite instead of just C:/xampp/htdocs
However, by doing this, I now cannot access the xampp page.

Thats not the recommend way, exactly for the issue that the XAMPP Administration page is no longer accessible.

jhavenite wrote:How can I make mysite the default while still having access to xampp?

Create VHosts, one for XAMPP, another (or some more) for your application.

jhavenite wrote:2) How can I restrict access to the phpmyadmin page?

You don't need to. The new XAMPP security concept already covers phpmyadmin so you can only access it from localhost.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6610
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby jhavenite » 15. March 2013 13:30

Thank you for your help. I'll need some further clarification on the phpmyadmin piece however.

I am running xampp version 1.8.1 which from what I can tell is the latest version yet I am able to access my server's phpmyadmin website from any PC on my domain. I would like to restrict this to just my server. What exactly is the new XAMPP security concept that you are referring to?

Thanks.
jhavenite
 
Posts: 5
Joined: 14. March 2013 21:55
XAMPP Version: 5.6.3
Operating System: Windows Server 2003

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby Altrea » 15. March 2013 14:19

jhavenite wrote:I am running xampp version 1.8.1 which from what I can tell is the latest version yet I am able to access my server's phpmyadmin website from any PC on my domain.

Which IPs does the other clients use?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6610
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby jhavenite » 15. March 2013 15:14

All domain PCs and the server are on 192.168.61.XXX. Is this the reason the phpmyadmin site is accessible from any PC on my domain? If that is the case, it's good to know access is limited to domain PCs, but having it further limited to just the server and maybe a designated PC would be ideal.
jhavenite
 
Posts: 5
Joined: 14. March 2013 21:55
XAMPP Version: 5.6.3
Operating System: Windows Server 2003

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby Altrea » 15. March 2013 15:37

jhavenite wrote:All domain PCs and the server are on 192.168.61.XXX. Is this the reason the phpmyadmin site is accessible from any PC on my domain?

Yes! Access to phpmyadmin (and any other sensitive XAMPP areas) is limited to all private IP ranges.

jhavenite wrote:having it further limited to just the server and maybe a designated PC would be ideal.

You can configure it to be limited to the very own server loopback IP (127.0.0.1 or ::1):

  • Open your \xampp\apache\conf\extra\http-xampp.conf
  • scroll down to find the new security concept
    Code: Select all
    <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
       Order deny,allow
       Deny from all
       Allow from ::1 127.0.0.0/8 \
          fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
          fe80::/10 169.254.0.0/16

       ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </LocationMatch>
  • change that block to something like that:
    Code: Select all
    <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
       Order deny,allow
       Deny from all
       Allow from ::1 127.0.0.1

       ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
    </LocationMatch>
  • save the file and restart your Apache
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 6610
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: Web Site Link Redirects me to XAMPP Page. Why?

Postby jhavenite » 15. March 2013 16:30

Thank you very much, I am good to go.

The only difference is that I had to use my server's IP address instead of the loopback.

Allow from XXX.XXX.XXX.XXX

I also setup my PC to have access and I used the full computer name to get that to work since I have a dynamic IP.
jhavenite
 
Posts: 5
Joined: 14. March 2013 21:55
XAMPP Version: 5.6.3
Operating System: Windows Server 2003


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 58 guests