Hi There,

Im relatively new to working in the cPanel hosted environment.

We have recently moved to a hosted cPanel environment.

All our simple scripts work, all our scripts that utilise cURL to POST and GET to external servers work.

What doesn't work when we attempt a GET /myscript.php? or POST from the outside. We receive a 403 error.

My question is how do I configure APACHE to allow the GET and POST to work?

Many thanks

Brian

    The likely issue here is that Apache typically runs under its own user account on the server (usually either "apache" or "nobody"). You therefore need to make sure that any directories and files it needs to run have at least read access for that user. In other words, if myscript.php is owned by your personal login account on the server and you have not given wider access to it, then the web server will not be able to access it. I haven't used cPanel in ages, so I don't recall the particulars of how you change permissions with it, but hopefully it's interface is "intuitive"? 🙂

      Argh, cPanel. What version of cPanel? I have a cPanel 56 install I'm hoping to deep-six before Christmas in favor of a real man's server without such fluff. 😛 😃

      Do they have SuPHP installed with it? Seems likely. In that case, likely Apache is running as whoever you are in cPanel. Hopefully the files in question are also owned by you. Open the cPanel File Manager and look at the Permissions for myscript.php and let us know what those are.

      Check the error logs (maybe just "Errors" in the 'Metrics' section).

      The other possibility is a bad/missing directive in the Apache config or .htaccess.

        Hi thanks for the replies. the two files in question have 755 permission, the public_html has permission 755.

        the .htaccess is zero bytes

          H again, forgot to post error log msg

          [Fri Aug 25 06:43:48.444114 2017] [access_compat:error] [pid 900677] [client 1.129.96.254:26756] AH01797: client denied by server configuration: /home/drdr1476/public_html/cgpsdata.php

            Hi,

            Apache config issue - now resolved

              Write a Reply...