Admin button setting for opening a set local custom domain

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

Admin button setting for opening a set local custom domain

Postby optimisticwalker » 07. September 2018 09:43

I'm running xampp on https://www.xampp.mysite.com It runs well. What configuration shall enable admin button in control panel to open xampp at https://www.xampp.mysite.com instead of http://localhost

Is there a way to do that without editing xampp-control.exe file or it's enough to edit the configuration file that is manipulated by xampp-control.exe?

I'm using custom server name and port like xampp.mysite.com:88 instead of localhost:80 and made http://localhost inaccessible through any browser.
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Admin button setting for opening a set local custom doma

Postby Altrea » 07. September 2018 09:57

localhost is hardcoded in the control panel sources, so you would need to edit the sources and recompile with Delphi
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: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Admin button setting for opening a set local custom doma

Postby Nobbie » 07. September 2018 10:52

optimisticwalker wrote:I'm using custom server name and port like xampp.mysite.com:88 instead of localhost:80 and made http://localhost inaccessible through any browser.


Instead i would create VirtualHosts "localhost" and "xampp.mysite.com" and in localhost i would add a simple Redirect to xampp.mysite.com:88 - done.
Nobbie
 
Posts: 13175
Joined: 09. March 2008 13:04

Re: Admin button setting for opening a set local custom doma

Postby optimisticwalker » 07. September 2018 19:58

Altrea wrote:localhost is hardcoded in the control panel sources, so you would need to edit the sources and recompile with Delphi


Yes, it can recognize port number only dynamically but not the server name. However, it would brig more flexibility to the end user if could accept server name dynamically. In fact users may want to use their own local domain name as their server that they can define within the local ip ranges between 127.0.0.1 to 127.255.255.255 in system hosts file.

Thanks,
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Admin button setting for opening a set local custom doma

Postby optimisticwalker » 08. September 2018 14:31

Nobbie wrote:
optimisticwalker wrote:I'm using custom server name and port like xampp.mysite.com:88 instead of localhost:80 and made http://localhost inaccessible through any browser.


Instead i would create VirtualHosts "localhost" and "xampp.mysite.com" and in localhost i would add a simple Redirect to xampp.mysite.com:88 - done.



Yes, that's not a bad idea. I have already local address record entry for localhost, xampp.mysite.com & www.xampp.mysite.com in apache VirtualHosts file. However, you can't do that for phpMyAdmin.

Thanks,
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Admin button setting for opening a set local custom doma

Postby Nobbie » 09. September 2018 11:50

optimisticwalker wrote:However, you can't do that for phpMyAdmin


If course i can, nothing easier than that:

Edit httpd-xampp.conf, delete the ALIAS for phpmyadmin and move the phpmyadmin folder into the htdocs folder. Done.
Nobbie
 
Posts: 13175
Joined: 09. March 2008 13:04

Re: Admin button setting for opening a set local custom doma

Postby Altrea » 09. September 2018 19:35

optimisticwalker wrote:it would brig more flexibility to the end user if could accept server name dynamically. In fact users may want to use their own local domain name as their server that they can define within the local ip ranges between 127.0.0.1 to 127.255.255.255 in system hosts file.

The programmer choosed to not implement a configuration method for the domain name, or the binaries the buttons are lead to, or many other things.
The control panel is a tool made from users here in the community board. If you think there is an addition which would be helpful for others too we would be happy you implement it for everybody.
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: 11933
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Admin button setting for opening a set local custom doma

Postby optimisticwalker » 13. September 2018 11:34

Nobbie wrote:Edit httpd-xampp.conf, delete the ALIAS for phpmyadmin and move the phpmyadmin folder into the htdocs folder. Done.


I guess it's not a good idea to make the system directory accessible through public directory.

Thanks,
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Admin button setting for opening a set local custom doma

Postby Nobbie » 13. September 2018 11:39

optimisticwalker wrote:I guess it's not a good idea to make the system directory accessible through public directory.


There is no public directory, you have a wrong impression about Webservers. A simple ALIAS does not protect anything, anyway you CAN protect everything in Apache, if it is accessed via Apache, and if it is NOT accessed via Apache, it is stored under Xampp Folder anyway. Last not least Xampp is only a development environment anywy, not meant for public servers. Its not a good idea to use Xampp as public server.
Nobbie
 
Posts: 13175
Joined: 09. March 2008 13:04

Re: Admin button setting for opening a set local custom doma

Postby optimisticwalker » 13. September 2018 11:43

Altrea wrote: If you think there is an addition which would be helpful for others too we would be happy you implement it for everybody.


The developers did a great job for the welfare of other developers. There isn't any doubt about it.

However, the change isn't for myself only. It would bring flexibility to all xampp users.

Thanks,
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Admin button setting for opening a set local custom doma

Postby optimisticwalker » 13. September 2018 11:51

Nobbie wrote:
optimisticwalker wrote:I guess it's not a good idea to make the system directory accessible through public directory.


There is no public directory, you have a wrong impression about Webservers. A simple ALIAS does not protect anything, anyway you CAN protect everything in Apache, if it is accessed via Apache, and if it is NOT accessed via Apache, it is stored under Xampp Folder anyway. Last not least Xampp is only a development environment anywy, not meant for public servers. Its not a good idea to use Xampp as public server.


My point of view behind the answer was about a publicly accessible server on the internet though I'm not going to use xampp that way. Moreover, directories and files inside the htdocs may be deleted accidentally as those are handled frequently.

However, I followed your suggestion and it works as desired :D . Just kept a backup of the directory phpMyAdmin.

Thanks,
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows

Re: Admin button setting for opening a set local custom doma

Postby Nobbie » 13. September 2018 12:28

optimisticwalker wrote:Moreover, directories and files inside the htdocs may be deleted accidentally as those are handled frequently.


Someone who accidentally deletes files and entire directories should not administer a web server.
Nobbie
 
Posts: 13175
Joined: 09. March 2008 13:04

Re: Admin button setting for opening a set local custom doma

Postby optimisticwalker » 13. September 2018 13:28

Someone who accidentally deletes files and entire directories should not administer a web server.

I strongly disagree. Human beings are not free from errors and accidental incidents.


The best solution is preventive measure in this case.

Thanks,
optimisticwalker
 
Posts: 23
Joined: 01. September 2018 21:21
XAMPP version: 7.2.9
Operating System: WIndows


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 215 guests