how to prevent users to access xampp phpmyadmin control panel directly |
how to prevent users to access xampp phpmyadmin control panel directly |
shankar from vizag |
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 |
Christian J |
Nov 5 2023, 09:22 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
Greetings!
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? |
shankar from vizag |
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? yes, like Instead of 12.34.56.78:80/index.html like index.html [/quote] |
Christian J |
Nov 6 2023, 08:05 AM
Post
#4
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
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? 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). |
CharlesEF |
Nov 14 2023, 06:42 PM
Post
#5
|
Programming Fanatic Group: Members Posts: 1,986 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
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 |
Christian J |
Nov 14 2023, 08:36 PM
Post
#6
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
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/ |
CharlesEF |
Nov 15 2023, 05:02 AM
Post
#7
|
Programming Fanatic Group: Members Posts: 1,986 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.
|
Christian J |
Nov 15 2023, 10:12 AM
Post
#8
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
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. BTW, note that some Windows anti-malware programs may protest if you edit your hosts file, mine was even reset one time. |
CharlesEF |
Nov 15 2023, 03:55 PM
Post
#9
|
Programming Fanatic Group: Members Posts: 1,986 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.
|
Christian J |
Nov 15 2023, 04:13 PM
Post
#10
|
. Group: WDG Moderators Posts: 9,722 Joined: 10-August 06 Member No.: 7 |
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. |
Lo-Fi Version | Time is now: 6th October 2024 - 06:50 PM |