All Pages Get 404 Error Except Home Page

sa3dy

Registered
Oct 20, 2017
4
0
1
Egypt
cPanel Access Level
Root Administrator
Hello All,

I have an issue with whm server all subfolder that using rewrite url get 404 for all clients.

And when i tried to execute this command /usr/local/cpanel/scripts/rebuildhttpdconf

its show

warn [rebuildhttpdconf] Failed to exec get_config in module Cpanel::AdvConfig::apache: get_proxy_from_php_config_for_domain requires a Cpanel::PHP::Config::Domain object at /usr/local/cpanel/Cpanel/PHPFPM/Get.pm line 30.
Failed to build /etc/apache2/conf/httpd.conf
Failed to exec get_config in module Cpanel::AdvConfig::apache: get_proxy_from_php_config_for_domain requires a Cpanel::PHP::Config::Domain object at /usr/local/cpanel/Cpanel/PHPFPM/Get.pm line 30.


Any thoughts?
 

Hummdis

Registered
Jan 16, 2020
2
0
76
Denver, CO, USA
cPanel Access Level
Root Administrator
For the record, my server was running NGINX. Therefore, the following had to be done for me to resolve this issue since I was forced to keep NGINX since Apache couldn't rebuild with the ports 80 and 443, but rather it was stuck in ports 8080 and 8443:

1. Remove NGINX from whatever you've done to install it. Of course, make a backup of your configuration files first.
2. Remove the PHP-FPM .yaml file for all users:
Bash:
rm -fv /var/cpanel/userdata/*/*.php-fpm.yaml
3. Now rebuild the httpd.conf file:
Bash:
/scripts/rebuildhttpdconf
4. Reload HTTPD:
Bash:
service httpd reload
8. Check that Apache binds to the correct ports:
Bash:
netstat -nlp | grep -P 'nginx|httpd'
In my case, this allowed Apache to rebuild and is now bound to ports 80 and 443 as expected with NGINX no longer on the server.