Access my website i got forbidden

Discussion in 'General' started by JULINT, Jan 2, 2021.

  1. JULINT

    JULINT Member

    Hi ,
    i have uploaded my php code on :
    1. folder /var/www/clients/client1/web1/web/public
    2. i have changed owner to web1:client1 on public folder also

    But why i got forbidden ?
     
  2. JULINT

    JULINT Member

    note:
    i have changed apache directive to change document root like below
    DocumentRoot "/var/www/clients/client1/web1/web/public"
     
  3. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Why do you have to use public folder since the defaulted web folder is already public?

    Basically, if you need to hide some other files and/or folders, can put them in parallel with web folder as they will not be accessible by public.

    Regarding your problem, the best is to check your logs and find what is the cause for such failure to access.

    Also make sure your php code also log something, if there is any error in it, so you can determine the fault and fix it, if any.
     
  4. JULINT

    JULINT Member

    i got error.log as below :
    [Sat Jan 02 14:01:48.457580 2021] [authz_core:error] [pid 22788] [client 115.178.208.224:47179] AH01630: client denied by server configuration: /var/www/clients/client1/web1/web/public/error.php, referer: http://mariberasuransi.co.id/
    [Sat Jan 02 14:01:48.597407 2021] [authz_core:error] [pid 22788] [client 115.178.208.224:47179] AH01630: client denied by server configuration: /var/www/clients/client1/web1/web/public/index.php
    [Sat Jan 02 14:01:48.687241 2021] [authz_core:error] [pid 22788] [client 115.178.208.224:47179] AH01630: client denied by server configuration: /var/www/clients/client1/web1/web/public/error.php, referer: http://mariberasuransi.co.id/
    [Sat Jan 02 14:01:48.777437 2021] [authz_core:error] [pid 22788] [client 115.178.208.224:47179] AH01630: client denied by server configuration: /var/www/clients/client1/web1/web/public/index.php
     
  5. JULINT

    JULINT Member

    Please help me, i am stuck with this :

    i got error.log as below :
    [Sat Jan 02 14:01:48.457580 2021] [authz_core:error] [pid 22788] [client 115.178.208.224:47179] AH01630: client denied by server configuration: /var/www/clients/client1/web1/web/public/error.php, referer: http://mariberasuransi.co.id/
    [Sat Jan 02 14:01:48.597407 2021] [authz_core:error] [pid 22788] [client 115.178.208.224:47179] AH01630: client denied by server configuration: /var/www/clients/client1/web1/web/public/index.php
    [Sat Jan 02 14:01:48.687241 2021] [authz_core:error] [pid 22788] [client 115.178.208.224:47179] AH01630: client denied by server configuration: /var/www/clients/client1/web1/web/public/error.php, referer: http://mariberasuransi.co.id/
    [Sat Jan 02 14:01:48.777437 2021] [authz_core:error] [pid 22788] [client 115.178.208.224:47179] AH01630: client denied by server configuration: /var/www/clients/client1/web1/web/public/index.php
     
  6. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Have you changed the ownership of the public folder recursively?
     
  7. JULINT

    JULINT Member

    yes. command line like this chown web1:client1 public/ -R
    working directory on /var/www/clients/client1/web1/web
     
  8. JULINT

    JULINT Member

    If i am browsing on .html file, it works
    But on .php file got 403 forbidden
     
  9. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    Did you enable PHP for this web?
     
  10. JULINT

    JULINT Member

    I have set PHP PHP-FPM is not working, but i set to PHP Fast-CGI , it works.

    Thanks for your help
     
  11. JULINT

    JULINT Member

    i have browsed one of the domain , it shows me php code , but another website no problem


    <?php
    die('a');
    include_once("config/config.php");
    include_once("config/init.php");
     
  12. JULINT

    JULINT Member

    I will reinstall it again from tutorial perfect server
     

Share This Page