Support

Site Restoration

#36221 404 on all pages on IIS 10 web server

Posted in ‘Site restoration’
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

PHP version
n/a
CMS Type
Other
CMS Version
n/a
Backup Tool Version
n/a
Kickstart version
n/a

Latest post by Driver.it.support on Friday, 26 November 2021 06:08 CST

Driver.it.support

I'm migrating a legacy system we have in place built on Joomla from and external C-Panel vps to IIS 10 on an internal server restore goes smoothly I do the clean up then I get the options to visit the back or front end of the site. 

At this point I just get 404 page not found on both front and backend of the site.

I restored the backup file to my local dev (xampp), I did it on php version 7.4.3 and 8.0.5 the restore  works perfectly so I suspected it could have something to do with the web.config (attached), on the IIS server but I'm not sure.

Installed vanilla Joomla and that works fine on the IIS server I compared the web.config files on the default joomla site and the restored site in hopes I could spot something but no joy.

I have installed the URL rewrite module installed on IIS version 2.1 I attempted to import rules from the htaccess file but no joy there either so removed them.

Any assistance with this would be much appreciated.

 

Cheers

Neil

Driver.it.support

Hi again

 

Apologies I should of also stated I read through the documentation and one part mentions setting the Live site variable in the configuration file I attempted this as well but same result 404, so I removed it again.

tampe125
Akeeba Staff

Hello,

let's take some steps to actually understand what's going on.

If you use Joomla default web.config file, everything is working fine?
When you start to have issues, when you try to generate the config file with Admin Tools?

In this case my suggestion is to manually remove sections one by one by editing the file, until you get your site up and running. The last section you removed is the one causing issues. Each section has a comment before it, explaining which feature added that code snippet. Once you have the "culprit" we can start working on a solution.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Driver.it.support

Hi 

 

No I didn't mention the Admin Tool I must not have been clear apologies.

 

I have used the Akeeba backup plugin to restore the site, I get 404 on all pages, once the restore has completed. I then installed vanilla Joomla separately on the IIS server to test it works and it does. 

At this point I checked the web.config on the restored site against the vanilla joomla sites web.config to see if I could spot anything different but they are the same.

 

Both the back end and front end are just 404 so I would not have access to the Admin Tools in any case. It really has me stumped I google and get by with IIS as I'm not an expert on it but I do have another php based system running successfully on this server already which is Laravel based so have a bit of an idea.

 

If I can provide any more info let me know I will be happy to do so.  

 

Thanks

Neil

 

tampe125
Akeeba Staff

Just to be sure: you are using a custom made web.config file, right?

If you use Joomla standard one, everything is working fine, am I correct?

You claim that the same custom web.config file is working fine on production, but on the restored website it gives you troubles. Is that correct?

If the file is the same, it means that there's something different in your server configuration. Server support is beyond the scope of our support, so I'm sorry but I can't help you on this particular issue.

Davide Tampellini

Developer and Support Staff

🇮🇹Italian: native 🇬🇧English: good • 🕐 My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Driver.it.support

Hi Thanks for your response,

The web.config on the site is what ever is generated when I do the restore process via kickstart and the .jpa backup file. The web.config from the completely separate Joomla site I created on the IIS server to test Joomla will work on the server is what was created when I setup that vanilla Joomla site.

The web.config from the vanilla Joomla site does not make the restored site I'm trying to get working work unfortunately. 

I appreciate what your saying about the server support however with the default Joomla site working on the server I'm not convinced it is the server itself, if it was the vanilla Joomla site would suffer the same issue.

If you can speak to your colleagues and offer any guidance at all on what I could potentially check I would really appreciate it as at this point I have checked everything I can think on (compared the php.ini file on the server against the live server, attempted to import the .htaccess file from the restored site into the url rewrite module, swopped out the php version used by the site downgrading it to the version it is running on the live server, installed a vanilla version of Joomla using the php version I used on the restored site, set the live site variable in the configuration.php file, removed and restored the site numerous times).

 

Thanks

Neil

nicholas
Akeeba Staff
Manager

I will be taking over this ticket from Davide as the only one of us who has access to IIS and has used it for development.

The web.config on the site is what ever is generated when I do the restore process via kickstart and the .jpa backup file.

We do not generate a web.config file during the restoration.

It sounds like you have the default web.config.txt file shipped with Joomla. This file would need to be renamed to web.config (remove the .txt extension).

There is a very important and fairly non–obvious reason I am asking this — I am not trying to be a condescending jerk, it's a major caveat in Windows itself. The Windows File Explorer hides by default the file extensions of known file types. The .txt extension (Text File) is a known file type. This means that web.config.txt would be displayed as web.config in Windows Files Explorer. The web.config file does not have a known file type so it will also be displayed as web.config.

Yep. Both files are displayed the same. Only one does anything with IIS. The other one is ignored.

I have been working with Windows since 3.0. I have fallen for this as late as last year. Of course I was aware of the caveat so I stopped, thought about it and found out fairly easily that I was sabotaged by Windows' defaults. That's why I am mentioning this.

The only way to know is to right–click on the file and click on Properties. You can then see the full name of the file.

The web.config from the vanilla Joomla site does not make the restored site I'm trying to get working work unfortunately.

Now, this is what makes me think that you have a web.config.txt file which is not taken into account by IIS. To you it may sound like the exact opposite. Bear with me. There is another non–obvious point, this time about Joomla.

I know you said that a brand new Joomla installation works. However, the brand new Joomla installation does NOT use URL rewriting, it uses index.php SEF URLs (e.g. /index.php/123-some-artile.html). These work without a web.config file on IIS. This is a deliberate choice in Joomla, they are trying to make the first experience of newcomers to Joomla an easy and pleasant one. This also means that the Joomla defaults can mislead you in this particular case.

So, you should try taking Joomla's default web.config.txt file, rename it to web.config and copy it to your site's root.

If this was not the case with your restored site please let me know. I have more tricks up my sleeve.

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!

Driver.it.support

Hi Nicholas 

 

Thanks I managed to sort it as I have been getting help on experts exchange as well.

 

Thanks for the response though.

 

Cheers;

Neil

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!