Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED HTTP ERROR 500 When Accessing Site by IP

Discussion in 'General Discussion' started by Melika, Jun 20, 2017.

  1. Melika

    Melika Member

    Joined:
    Feb 22, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    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.
     
  3. Melika

    Melika Member

    Joined:
    Feb 22, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UAE
    cPanel Access Level:
    Root Administrator
    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 ...
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

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

    Thank you.
     
  5. Melika

    Melika Member

    Joined:
    Feb 22, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

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

Share This Page