Page 1 of 1

Admin button setting for opening a set local custom domain

PostPosted: 07. September 2018 09:43
by optimisticwalker
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.

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

PostPosted: 07. September 2018 09:57
by Altrea
localhost is hardcoded in the control panel sources, so you would need to edit the sources and recompile with Delphi

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

PostPosted: 07. September 2018 10:52
by Nobbie
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.

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

PostPosted: 07. September 2018 19:58
by optimisticwalker
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,

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

PostPosted: 08. September 2018 14:31
by optimisticwalker
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,

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

PostPosted: 09. September 2018 11:50
by Nobbie
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.

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

PostPosted: 09. September 2018 19:35
by Altrea
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.

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

PostPosted: 13. September 2018 11:34
by optimisticwalker
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,

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

PostPosted: 13. September 2018 11:39
by Nobbie
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.

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

PostPosted: 13. September 2018 11:43
by optimisticwalker
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,

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

PostPosted: 13. September 2018 11:51
by optimisticwalker
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,

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

PostPosted: 13. September 2018 12:28
by Nobbie
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.

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

PostPosted: 13. September 2018 13:28
by optimisticwalker
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,