Support

Admin Tools

#35475 Admin Tools detected that your server configuration file (web.config) has been modified

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 PTWD on Friday, 30 July 2021 12:25 CDT

PTWD

I logged into our website today to check out a login failure by some bad actor that had taken place about 90 minutes before I logged in. When I went to the AdminTools page, I found this warning message:

Admin Tools detected that your server configuration file (ie .htaccess, nginx.conf or web.config) has been modified. We strongly suggest you to put any manual edit inside the Custom rules fields, so you won't lose them if you ever regenerate the file using Admin Tools.

We don't use NginX, but the .htaccess and web.config.txt files were dated as last changed on May 24, 2021. The problem was that I hadn't logged in to the site itself since June 1st. I had a problem with the site's email and had logged into the webhost account on May 28 and 29, but nothing in between. As far as I can remember, there isn't anything that's on auto-update. So, I'm not sure how/why those files were modified on May 24th, or whether it had anything to do with today's report of a login failure (unlikely perhaps, but it's a weird coincidence).

In any case, I backed up the whole site, and made a manual backup of .htaccess and web.config.txt, and then clicked the "Regenerate" button in the warning message. However, the regenerated .htaccess broke the site - seemed to have no access to the CSS, as it showed the text but no layout. So I backed up the regenerated version (it seems only .htaccess was changed, not web.config) and restored the original version from the backup I'd made, and the site now displays fine.

But I'm left wondering (a) why the warning message, and (b) why/how the .htaccess and web.config files were modified when I hadn't logged in for a month, and (c) why the regenerated .htaccess broke the site. When I tried to compare the before and after versions of .htaccess, they seem to be structured so differently that I'm not sure I could tell what the differences are.

Many thanks in advance for your help. :-) Let me know if you need anything from me to solve the mysteries (more information, login access, etc).

Since the site is running okay at the moment this isn't an urgent request, but I don't like so many mysteries happening at once, so it would be great to understand what's going on with this.

PTWD

I got confused about the dates of logins and file dates. Here is the correct information:

We don't use NginX, but the .htaccess and web.config.txt files were dated as last changed on May 24, 2021. (CORRECTED INFO:) I had logged in a few times since that date and I think I would have visited the AdminTools page at some point during those times, and didn't see that warning message, so it seems to have been generated since I last logged in (June 1st). As far as I can remember, there isn't anything that's on auto-update. So, I'm not sure how/why those files were modified on May 24th, or whether it had anything to do with today's report of a login failure (unlikely perhaps, but it's a weird coincidence).

nicholas
Akeeba Staff
Manager

I am very confused by your message because it's going a lot of back and forth and mixing things that are mutually exclusive.

Your site can run EITHER on NginX OR Apache OR IIS. Each of these servers has a different configuration file: nginx.conf for NginX which needs special instructions to use; .htaccess for Apache; web.config for IIS.

Your ticket title claims that you are using web.config which is used by Microsoft Internet Information Services (IIS). Further below you said that a .htaccess file, used only by Apache, is generated and that it being generated had an impact on your site.

With this mutually exclusive, contradictory information I cannot be of any help. First you need to tell me which web server you are using on your site. Then I can tell you what to do and why.

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!

PTWD

Hi Nicholas,

Apologies for the confusion! I wasn't aware of what NginX was. I am definitely on an Apache server. As for web.config I found a file in the root directory called web.config.txt which I thought might have been what was referred to in the questions we answer when creating the ticket, and it was dated for May 24, 2021, so it apparently had been updated for some reason (since my site is older than May 24th).

So, does that help a bit? I'll provide more information if you can help me know what you need. Thanks.

nicholas
Akeeba Staff
Manager

The web.config.txt and htaccess.txt files are shipped with Joomla. They are example files. They are not used by Admin Tools.

So, you are an Apache user, the file that applies to you is .htaccess and please note the dot in front.

You had also set up .htaccess Maker. Admin Tools detected that the settings in the .htaccess Maker and the .htaccess file on your site did not match, hence the warning. Clicking the button on the warning regenerated the .htaccess file as if you went into the .htaccess Maker and clicked on Save and Create .htaccess.

If you do not wish to configure and use the .htaccess Maker you can ignore this warning.

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!

PTWD

Sorry for the delay getting back to you. Many thanks for your help.

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!