Support

Admin Tools

#36501 Core Joomla4-website not working correct after running setup-wizzard Admintools with default values

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Saturday, 26 February 2022 20:17 CST

sandvalley2019

Hi there,

After having trouble with placing localhost websites to the live-server, I found out the following:

  • Downloaded Joomla 4 and installed in on localhost --> website front-end runs fine
  • Downloaded AdminTools PRO and installed it --> website front-end runs fine
  • Clicked on "set-up wizzard" that is adviced after installing AdminTools, and used default configuration: --> website front-end redirects to Xampp dashboard.

When I add "index.php" the front-end website is running correct.

Removing the .htaccess or replacing it bij htaccess.txt did not make any difference.

There is no error in the localhost apache logfile

Regards,
Peter

nicholas
Akeeba Staff
Manager

That's because you did not remove XAMPP's default index.html (or index.htm? I can't remember, I haven't used XAMPP in years). As a result when the Configuration Wizard applies the default .htaccess Maker settings which change the order of the default pages to have the index.html and index.htm files searched before index.php this is the default page you see when accessing localhost.

Solutions (pick ONE):

1. Use a subdirectory for your site; OR

2. Remove the index.html / index.htm from your XAMPP web root

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sandvalley2019

Thanks for the reply.

I developed 80 websites on localhost over the years in subdirectories in XAMPP. This is the first time I have this situation.

The reason I started with the core Joomla and Admintools only because I wanted to know where the strange behaviour came from when developing complete websites. For example a 'too many redirects' error after restoring a localhosit-site to a live site ( see https://dwrbouw.noordoost.nl/ ) I turned out AdminTools was the cause, more precise the Wizzard.

Please have a look more closely.

PS: what do you use for local webserver instead of XAMPP?

Best regards,
Peter

nicholas
Akeeba Staff
Manager

> For example a 'too many redirects' error after restoring a localhosit-site to a live site ( see https://dwrbouw.noordoost.nl/ ) I turned out AdminTools was the cause, more precise the Wizzard.

I do say in the documentation that there is no such thing as an one-size-fits-all security solution. You must tailor it for each site and server. It should be self-evident that moving your site between servers and domains does change the tailoring you need to do.

Since you are restoring to a different domain name and you are using Admin Tools and the .htaccess Maker you need to do two things at the very least:

  1. Components, Admin Tools, Web Application Firewall, Configure WAF. Edit the Allowed Domains, add the domain name you transferred your site to (dwrbouw.noordoost.nl). Please read the documentation to understand why.
  2. Components, Admin Tools, .htaccess Maker. Scroll all the way to the bottom. Change the HTTP and HTTP domain names and the directory to match the domain name (dwrbouw.noordoost.nl) and directory (/) you transferred your site to. Click on Save & Create .htaccess. Please read the documentation to understand why.

It is also very likely that what the features your live host's web server allows are different than those of your local server. Therefore you may have to change more things in the .htaccess Maker as per our documentation.

> Please have a look more closely.

You can either accept that I know what I am doing, follow my instructions and see where that gets us OR you can assume that you know better than me and not ask me to help you. If you have already decided that I can't help you why waste your and my time asking me to help? I already told you what is the problem and how to fix it.

Furthermore, you are implying that the Quick Setup Wizard is the only way to configure Admin Tools and gives you no options. This is a false statement on both counts. It's not the only or recommended way to configure Admin Tools, it's only there to give you a starting point. You do have options, one of which is whether you want to create a security tightening .htaccess file, i.e. have it run the .htaccess Maker with a default configuration. You are ultimately responsible for fine tuning the configuration in each individual Admin Tools feature. In this case, you can fine tune the .htaccess file in the .htaccess Maker feature BUT I do not recommend it. I will tell you what you could do and why not to do it instead of the solution I already gave you.

There's an option called β€œForce index.php parsing before index.html”. If you enable it you will mask the real problem, that you never removed XAMPP's default index file from your site.

However, I did NOT tell you to do that because once you move your site to a live server you might NOT be able to use this .htaccess Maker feature β€” it depends on the server setup controlled by your host β€” which means that you might end up seeing XAMPP's default page on your live site if it does indeed serve the index.html / index.htm files before index.php!

Hence my recommendation to address the root cause of the problem instead of suggesting a workaround which might catch you off guard when you transfer the site. My operating assumption is that you are not going to host the site forever on your XAMPP setup, you are developing locally to deploy live. If my assumption is wrong, sure, you can use the workaround stated above assuming that XAMPP's Apache configuration does allow you to change the index file through the .htaccess (if I recall correctly, this is not the case so you'd instead get a 500 Internal Server Error enabling this option which is why this option is not enabled when you run the Quick Setup Wizard).

This issue is trivial, it's been happening to people for well over 20 years (long before I started publishing software), of course I know what it is and how to address it. In my day to day work I am debugging extremely niche and counter-intuitive issues without even having access to the actual server just by virtue of my experience, like I did this morning with am issue in Joomla Update when updating from 3.10 to 4.1: https://github.com/joomla/joomla-cms/issues/36833 I hope that gives you some better insight on whether I need to β€œlook more closely” at an outright trivial issue or not.

> PS: what do you use for local webserver instead of XAMPP?

My own server setup, of course. I am currently on macOS but I do have similar server setups on Windows and Linux. I do test our software on all environments and do troubleshoot across all three OS. Better yet, I have fully documented my various server setups over the years on my blog.

I can also give you the history of older setups I was using:

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sandvalley2019

Thanks Nicholas.

I never doubted your knowledge about the great software you develop. Just wanted you to know that there is no index.html in my XAMPP-folder, and that the problem I faced did only come up now after many installs of Joomla websites on localhost with XAMPP and deplying it to the live site. I asked for help, not only for myself, but for all the novice and experianced users that have the same problem.

I will study you answer and hope to find the reason of this (for me) strange behaviour.

Have a nice day.

Best regards,
Peter

nicholas
Akeeba Staff
Manager

Here's what you said in your opening message:

> website front-end redirects to Xampp dashboard.

Considering that the XAMPP dashboard is a desktop application, not a web page, this is impossible on its face.

I had to make a guess as to what you meant. My guess was that you conflated the default XAMPP page with its dashboard.

Apparently, you mean something else. I'd like a screenshot to understand what you actually see since what you described is not possible and my guess appears to not be correct.

It would help even more if you could tell me what is the URL you are trying to visit when this happens and what is the actual URL in the browser when you see whatever it is that you see.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sandvalley2019

The first image shows the front-end website after installing core Joomla with default configuration,Β  and the Admintools Pro package with default configuration. Url is https://localhost

The second image shows the front-end website after using the Quick Setup Wizzard of AdminTools with the default configuration. It shows the XAMPP page on the url https://localhost/dashboard/ (that is why I called it the XAMPP Dashboard, but it is also the default XAMPP website. Confusing)

In the global configuration "Search Engine Friendly URL" is ON, and "Use URL rewriging" is OFF as by default.

Β 

sandvalley2019

The URL of the working local site is https://localhost/mavasol, and not https://localhost as I mentioned in the previous post. The url https://localhost always redirects to the default XAMPP-page. That might be part of the 'problem': when you don't give the name of the subfolder, it redirects tot the "dashboard" folder, that is the default XAMPP folder.

nicholas
Akeeba Staff
Manager

Upon your insistence I took a VERY close look at it.

I disabled my local server on Windows 10 and removed the Apache and MySQL servers to avoid any conflicts.

I download and installed the latest version of XAMPP (no version number stated on their site) with PHP 8.0 .

I confirmed that it works.

I created a new database named joomla with a user joomla with password joomla having all privileges for it.

I created a new folder called joomla using Windows Explorer under the directory c:\XAMPP\htdocs, i.e. I now have a directory c:\XAMPP\htdocs\joomla

I downloaded and installed Joomla 3.10.5 using the Brochure sample data into the directory c:\XAMPP\htdocs\joomla and the database joomla with username joomla and password joomla. It installs just fine.

I confirmed that the site works properly as-is, i.e. accessing http://localhost/joomla/ shows me the site I just installed.

I downloaded and installed Admin Tools Professional 6.1.4 on this site.

I used the Quick Setup Wizard using its default options, without changing a single thing.

Trying to access http://localhost/joomla/ works just fine, showing the site, the exact opposite of what you described.

Likewise, trying to access http://localhost/joomla (WITHOUT the trailing slash) redirects you to http://localhost/joomla/ and the site displays just fine.

Accessing http://localhost/joomla/index.php of course works just fine.

Further to that, trying to access a random directory or file such as http://localhost/dodo or http://localhost/not_there.html results in a 404 error page. It does NOT redirect to http://localhost/dashboard which is the exact opposite of what you described.

As a result and upon VERY close examination I conclude that your issue does not exist with the steps you have provided for replication.

The only way your issue could be experienced is if you had somehow set up a redirection from your site's root to the XAMPP root (https://localhost/). This does not happen automatically. I tried a few more different ways including creating the site afresh and accessing it over HTTPS (so that Admin Tools tries to use HSTS) to no avail. You need something third party to trigger this redirection and this something is not Admin Tools itself.

Another possibility would be you using an older version of XAMPP which does something weird instead of just redirecting http://localhost/ to the dsahboard but given that I have never heard about your issue as described or any other similar problem with any version of XAMPP I am far more inclined to believe that your problem has to do with something specific to your site, not Admin Tools or XAMPP itself.

Therefore I consider this issue self-inflicted due to site configuration.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

nicholas
Akeeba Staff
Manager

PS: If you want to dispute this VERY CLOSE look at your issue please reproduce this on a brand new installation of XAMPP with a brand new installation of Joomla and provide the exact steps you followed, like I did above, so I can reproduce it. Alternatively, you can provide me with a backup of your affected site and I will take one final look at this. I've already spent 3 hours trying to reproduce this issue with your instructions, I can't spend too much more if there's no guarantee of reproducibility.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sandvalley2019

I looked close at your reply and the way you tried to reproduce my issue.

Could it be that it is a Joomla 4 issue? As I mentioned in my first post, I downloaded Joomla 4, and in you test you used Joomla 3.10.5.

If you don't want to spent more time on this issue, please close this ticket. I decided to not install AdminTools while developing websites local, but wait with installation until the website is on the live server. Works fine for me, thank you.

Β 

nicholas
Akeeba Staff
Manager

There is no difference between Joomla 3 and 4 but I could try this later today. After sending this reply I will switch the ticket back to the Open state and retrace my steps.

The hard part yesterday was figuring out how to install XAMPP without destroying my local setup (XAMPP does not play ball with other local servers and they do use some silly defaults, like installing Apache as a service with the default Apache service name when they will always be running it under your user account). I had to do some trial and error which was the bulk of the time I spent on this. Now that I have my notes on how to do this it will take me about 30' to test instead of 2 Β½ hours.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

nicholas
Akeeba Staff
Manager

I tried again with XAMPP, Joomla 4.0.6 and Admin Tools 7.0.10. I still cannot reproduce your issue.

There's a PHP warning shown after the Quick Setup Wizard but that's a cosmetic issue, not a functional one β€” and we've already fixed it for the upcoming version as far as I can see.

Something else is happening with your site. Without being able to dissect the actual site and XAMPP installation I am afraid I do not have much more to help you with.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sandvalley2019

Thanks a lot for your effort. I never expected that my question took such a lot of your time. My intention was to help you software to become even better.

It also took me a lot of time today to try it on another computer, where I get the same strange behaviour. All new installations with default values, no tweaking. On Windows 10 and windows 11.

I guess I will never find out what it is, but will keep using your great extension on the live site!

Β 

Β 

nicholas
Akeeba Staff
Manager

Please do try on a different computer with a new XAMPP installation. First try with a new, empty installation of Joomla 4.

If you cannot reproduce the issue it means it's probably something specific to the other XAMPP installation or your site. In this case restorer a backup of your site on this new XAMPP installation, install Admin Tools Professional and see if you can reproduce the issue. If you can, it's something on your site. If you can't, the problem was on your original XAMPP installation.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

sandvalley2019

Other computer: same problem

New XAMPP installation: same problem.

BUT: I noticed that when I go to 'localhost/basisjoomla4' (that is the link that is on the top-right in the Joomla backend) the url was redirected to the XAMPP default page, but with https https://localhost/dashboard, even though I did not set the value to redirect to https in the Joomla configuration.

Then I commented out the following rewrite rules in the .htaccess file

# HTTPS
#RewriteCond %{HTTPS} =on [OR]
#RewriteCond %{HTTP:X-Forwarded-Proto} !=http
#RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
#RewriteRule ^(.*)$ https://%1/basisjoomla4/$1 [R=301,L]
##### Redirect www to non-www -- END

##### Force HTTPS for certain pages -- BEGIN
#RewriteCond %{HTTPS} ^off$ [NC,OR]
#RewriteCond %{HTTP:X-Forwarded-Proto} =http
#RewriteRule ^$ https://localhost/ [R=301,L]
##### Force HTTPS for certain pages -- END

And now it works fine!

Maybe in your local situation there is a https-certificate on the local server? That might be the reason that you could not reproduce the issue.

Best regards,
Peter

nicholas
Akeeba Staff
Manager

Ah, that makes sense now! HSTS will not work correctly on the literal domain name localhost. This is only meant for sites with real domain names.

Moreover, since XAMPP doesn't have a valid HTTPS certificate I could only visit the HTTPS version of the site directly, allowing the bad certificate, meaning I could never test the redirection from HTTP to HTTPS (the browser complained).

As for your question about certificates. Yes, I do have valid certificates β€” trusted by my browser. As you may have read in my articles, I never use localhost with my own servers. I always use a β€œfake” domain name like www.local.web which is mapped to 127.0.0.1 using the operating system's hosts file. For that domain name I do have a valid TLS certificate I created using the process I describe in one of my aforementioned blog posts. As a result I can test the HSTS feature locally since my β€œfake” domain name is a valid domain as far as my browsers know, treating it like any other live site. Of course I also test with real domain names or live servers but the development takes place using these fake domains.

Let's cut a long story short and tell you what you need to do on your local sites hosted on XAMPP to avoid too much confusion, shall we?

After using the Quick Setup Wizard go to Components, Admin Tools for Joomla, .htaccess Maker and make the following changes:

  • HSTS Header (for HTTPS-only sites): No
  • Base directory of your site (/ for domain's root): /your_directory_name where your_directory_name is the subdirectory of htdocs where your site is installed.

Then click on Save & Create .htaccess.

When transferring the site to a live server go to the same page and make the following changes (assuming the site's installed on the site's root and has a valid TLS certificate):

  • HSTS Header (for HTTPS-only sites): Yes
  • Host name for HTTPS requests (without https://) *: your domain name, e.g. example.com
  • Host name for HTTP requests (without http://) *: your domain name, e.g. example.com
  • Base directory of your site (/ for domain's root): / (or leave it empty)

Then, again, click on Save & Create .htaccess.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!