The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> how to prevent users to access xampp phpmyadmin control panel directly
shankar from vizag
post Nov 5 2023, 06:05 AM
Post #1


Advanced Member
****

Group: Members
Posts: 202
Joined: 18-June 13
Member No.: 19,316



Greetings

Please suggest simpler ways for the following two issues:

1. How to prevent USERS to access directly to the XAMPP phpmyadmin C-panel through browser.

2. Can I define a name instead of IP address / page name (eg.12.34.56.78:80/index.html) using XAMPP to open html page in the browser ?

Please guide me to overcome the above issues.

Regards
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 5 2023, 09:22 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



Greetings!

QUOTE(shankar from vizag @ Nov 5 2023, 12:05 PM) *

1. How to prevent USERS to access directly to the XAMPP phpmyadmin C-panel through browser.

In my understanding XAMPP is normally not meant to be accessible from the web. Are you using XAMPP as an online web server?

QUOTE
2. Can I define a name instead of IP address / page name (eg.12.34.56.78:80/index.html) using XAMPP to open html page in the browser ?

You mean like a domain name, but on your local computer? unsure.gif

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
shankar from vizag
post Nov 5 2023, 08:38 PM
Post #3


Advanced Member
****

Group: Members
Posts: 202
Joined: 18-June 13
Member No.: 19,316



Greetings!

Thank you so much for the reply Mr. Christian J

[quote name='shankar from vizag' post='146664' date='Nov 5 2023, 12:05 PM']
1. How to prevent USERS to access directly to the XAMPP phpmyadmin C-panel through browser.
[/quote]
In my understanding XAMPP is normally not meant to be accessible from the web. Are you using XAMPP as an online web server?

I am using XAMPP server in my local intranet. I had noticed that the client is easily accessing the control panel of XAMPP phpmyadmin page. I want to restrict the access from client side at the same time client should able to access my php page. This is my intention.

[quote]2. Can I define a name instead of IP address / page name (eg.12.34.56.78:80/index.html) using XAMPP to open html page in the browser ?[/quote]
You mean like a domain name, but on your local computer? unsure.gif

yes, like

Instead of 12.34.56.78:80/index.html
like index.html
[/quote]
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 6 2023, 08:05 AM
Post #4


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(shankar from vizag @ Nov 6 2023, 02:38 AM) *

I am using XAMPP server in my local intranet. I had noticed that the client is easily accessing the control panel of XAMPP phpmyadmin page. I want to restrict the access from client side at the same time client should able to access my php page. This is my intention.

Maybe this could work, but I haven't tried myself: phpmyadmin > User Accounts > root Edit Privileges > Change Password.
https://stackoverflow.com/questions/1222443...092752#42092752

QUOTE

QUOTE
2. Can I define a name instead of IP address / page name (eg.12.34.56.78:80/index.html) using XAMPP to open html page in the browser ?

You mean like a domain name, but on your local computer? unsure.gif

yes, like

Instead of 12.34.56.78:80/index.html
like index.html

You can use http://localhost/index.html (or better http://localhost/foo/index.html, http://localhost/bar/index.html etc if you have multiple projects).

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Nov 14 2023, 06:42 PM
Post #5


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



QUOTE(shankar from vizag @ Nov 5 2023, 05:05 AM) *

Greetings

Please suggest simpler ways for the following two issues:

2. Can I define a name instead of IP address / page name (eg.12.34.56.78:80/index.html) using XAMPP to open html page in the browser ?

Please guide me to overcome the above issues.

Regards

I seem to remember you can use the HOSTS file for this. As long as it is for your local computer. Both *nix/Windows has one. In Windows it is hidden, so you have to be sure to show hidden files. This file is part of the O/S, it has nothing to do with the web server. But you may have to restart the web server after you make changes to the HOSTS file.

This post has been edited by CharlesEF: Nov 14 2023, 06:46 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 14 2023, 08:36 PM
Post #6


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(CharlesEF @ Nov 15 2023, 12:42 AM) *

I seem to remember you can use the HOSTS file for this.

That's how it works with a standalone Apache server, but I wonder if the HOSTS file is necessary with XAMPP? I made a test directory in XAMPP's htdocs directory:

CODE
C:\xampp\htdocs\test

and put an index.html file inside it. After starting XAMPP's Apache server I could then access the HTML page in a browser right away at this URL:

CODE
http://localhost/test/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Nov 15 2023, 05:02 AM
Post #7


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



If I remember correctly you could use the HOSTS file to change 'localhost' to 'example.com', for example.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 15 2023, 10:12 AM
Post #8


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(CharlesEF @ Nov 15 2023, 11:02 AM) *

If I remember correctly you could use the HOSTS file to change 'localhost' to 'example.com', for example.

Yes, or redirect 'example.com' to localhost (can be used to block advertizing domains).

But to acess my own pages it seems I still need to use "http://localhost/example.com". With just http://example.com (after making a directory called "/example.com/", as well as an entry in the hosts file) I just see XAMPP's welcome page in my browser. unsure.gif

BTW, note that some Windows anti-malware programs may protest if you edit your hosts file, mine was even reset one time.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Nov 15 2023, 03:55 PM
Post #9


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



As I said, it has been many years since I messed with the HOSTS file, so my memory many be off. Once you change the HOSTS file don't you need to reboot before the entry takes effect? Also, to access pages on my development computer I only use 'localhost:81'. I have several sites with different ports. My web server is Windows IIS.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 15 2023, 04:13 PM
Post #10


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



QUOTE(CharlesEF @ Nov 15 2023, 09:55 PM) *

As I said, it has been many years since I messed with the HOSTS file, so my memory many be off.

Same here, and then I used standalone Apache (without XAMPP).

QUOTE
Once you change the HOSTS file don't you need to reboot before the entry takes effect?

Not Windows, but it seems you need to reboot the browser.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 01:43 AM