SOLVED HTTP ERROR 500 When Accessing Site by IP

Melika

Member
Feb 22, 2017
5
0
1
UAE
cPanel Access Level
Root Administrator
Hi everyone,
I have some accounts on my server with dedicated IPs assigned to them. For some of them, I can access them with their IP without a problem. (for some, the IP shows a blank directory (!) and for some, the IP is redirected to the main site and I assume this has something to do with their htaccess rules)
But there is this one site with a dedicated IP assigned to it which when access directly by the IP, it shows HTTP ERROR 500.

The logs inside the cPanel account show nothing. Same goes for Apache error log.

a little about my server environment:

CloudLinux with cagefs enabled
Nginx + Apache
PHP-fpm enabled

Things I have tried that didn't work:
1 - turned off php-fpm for the account
2 - emptied the htaccess file inside the account's public_html dir
3 - rebuilt the vhost via nginx

I'd be happy to know what you think about this.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

You should see an entry in /usr/local/apache/logs/error_log when encountering a 500 error code in the web browser. Have you tried temporarily disabling Nginx to rule it out as the cause of the issue?

Thank you.
 

Melika

Member
Feb 22, 2017
5
0
1
UAE
cPanel Access Level
Root Administrator
Hello,

You should see an entry in /usr/local/apache/logs/error_log when encountering a 500 error code in the web browser. Have you tried temporarily disabling Nginx to rule it out as the cause of the issue?

Thank you.
Thanks for your reply.
As I mentioned, I checked the Apache error_log and there is nothing related to that account or that ip.
I didn't disable Nginx since other accounts with dedicated IPs are working without a problem on the same server with nginx.
I also emptied the website's htaccess file to see if this fixes the problem but it didn't work ...
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

Feel free to open a support ticket using the link in my signature so we can take a closer look.

Thank you.
 

Melika

Member
Feb 22, 2017
5
0
1
UAE
cPanel Access Level
Root Administrator
The problem is resolved now :)
Turns out i had to add a rule to the website's htaccess file to be able to handle the request when the accessed URL starts with the IP.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
Hello,

I'm happy to see the issue is now solved. Thank you for updating us with the outcome.