mod_rewrite gone with latest easyapache update

josepheid

Member
Oct 24, 2019
5
0
1
Lebanon
cPanel Access Level
Root Administrator
After performing a full server backup, i have updated the easyapache4 and the rpm of the server. it seems it is a cPanel 82.0.17 related error.

the rewrite engine is not working anymore after the cpanel update.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,273
313
Houston
mod_rewrite should be compiled - you should be able to check it with the following:

Code:
httpd -M |grep rewrite
Are you seeing related errors in the apache error logs?
 

josepheid

Member
Oct 24, 2019
5
0
1
Lebanon
cPanel Access Level
Root Administrator
mod_rewrite should be compiled - you should be able to check it with the following:

Code:
httpd -M |grep rewrite
Are you seeing related errors in the apache error logs?
The problem was that after updating to the latest current release, the problem was that the websites are not loading correctly and i have seen errors related to php and rewrite.

I had to do a full server restore for the problem to be solved.
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,273
313
Houston
I understood that seemed to be a result of the update, unfortunately, there is no way to know what the issue actually was once the server has been restored. As of now I don't see any further reports of this behavior, if something of this nature occurs again please feel free to open a ticket so that we can look further into it.


Thanks!
 
Aug 5, 2016
3
0
1
Brazil
cPanel Access Level
DataCenter Provider
I have the same problem. I can't access addresses through mod_rewrite.

My error_log shows:
[Sun Nov 10 19:37:45.588494 2019] [:error] [pid 9047] [client xxx.xxx.xxx.xxx:50782] File does not exist: /var/www/html/index.php, referer: http://xxx.xxx.xxx.xxx/~user/

I can't find a solution and I wouldn't want to have to do a full server restore.

Can help me?
Thanks!
 

BlueSteam

Well-Known Member
Feb 21, 2013
110
16
68
cPanel Access Level
Reseller Owner
We are having the same issue on a server with Prestashop....store was perfectly fine until the last update. now this is what is shown when checking URL rewriting:

<3rd party link removed>
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,273
313
Houston
Hello @Marcelo R. Berwanger

I would almost never recommend a full restore of the server to resolve an issue.

In your case it looks like the redirect fails when attempting to navigate to a temp url like that used for mod_userdir - is mod_userdir protection disabled on the server? You can identify if it is by going to WHM>>Security Center>>Apache mod_userdir Tweak

@BlueSteam - even though I removed the link to the 3rd party site, I did take a look at it - what is the output of the following:

Code:
httpd -M |grep rewrite
Does the following complete successfully and is the issue resolved once it is completed:

Code:
/usr/local/cpanel/scripts/rebuildhttpdconf && /usr/local/cpanel/scripts/restartsrv_httpd && apachectl status
 
Aug 5, 2016
3
0
1
Brazil
cPanel Access Level
DataCenter Provider
Hi @cPanelLauren

I got it. But as it is a new server managed by Godaddy and there was no I ended up doing a full restore server and mod_rewrite works.

Yes, I had disabled mod_userdir protection.

I hired a VPS from Godaddy and their admin user is not allowed to run the commands you gave me. :(

Thanks!
 
Last edited:

BlueSteam

Well-Known Member
Feb 21, 2013
110
16
68
cPanel Access Level
Reseller Owner
We have solved the issue. We determined that rewrite is now part of apache by default and we are running the FastCGI on the server so that is why we could not see it on the phpinfo output.

Testing the url rewrite worked fine.

The root cause of this problem turned out to be the apache module mod_evasive which we have now disabled temporarily through EasyApache4 until we can tweak the settings to be more lenient.
 
  • Like
Reactions: cPanelLauren