Results 1 to 6 of 6

Thread: web apps in /var/www/html with 403 error

  1. #1
    Join Date
    Nov 2004
    Posts
    283

    web apps in /var/www/html with 403 error

    All apps there returns 403 error. I tried ip/webmail, domain/webmail... all 403.
    Try to update CB2, rewrite_confs, not solved.

    In /etc/httpd/conf/extra/httpd-hostname.conf

    Code:
    <Directory /var/www/html>
    	Options +SymLinksIfOwnerMatch +IncludesNoExec -Indexes
    	AllowOverride AuthConfig FileInfo Indexes Limit Options=Includes,IncludesNOEXEC,Indexes,ExecCGI,MultiViews,SymLinksIfOwnerMatch,None
    
    	Require all granted
    # ls -l /var
    dr-xr-x--x 10 webapps nginx 4096 Dec 20 2014 www

    # ls -l /var/www
    drwxr-xr-x 11 webapps webapps 4096 Jan 9 23:09 html

    # ls -l /var/www/html
    total 655836
    -rw-r--r-- 1 webapps webapps 43 Jan 9 23:09 index.html
    lrwxrwxrwx 1 webapps webapps 44 Jan 8 17:36 phpMyAdmin -> /var/www/html/phpMyAdmin-4.7.7-all-languages
    drwxr-xr-x 13 webapps webapps 4096 Jan 8 17:36 phpMyAdmin-4.7.7-all-languages
    -rwxr-xr-x 1 root root 68 May 31 2011 redirect.php
    lrwxrwxrwx 1 webapps webapps 19 Jan 9 21:34 roundcube -> roundcubemail-1.3.3
    drwxr-xr-x 12 webapps webapps 4096 Jan 9 23:27 roundcubemail-1.3.3
    lrwxrwxrwx 1 webapps webapps 33 Jan 9 21:38 squirrelmail -> squirrelmail-1.4.23-20170731_0200
    drwxr-xr-x 17 webapps webapps 4096 Jan 9 21:38 squirrelmail-1.4.23-20170731_0200

    Tried chown webapps:webapps /var/www, it didn't solve the problem.

    In /var/log/httpd/error_log, it shows
    [access_compat:error] [pid 1047463:tid 140428351859008] [client xx.xxx.xxx.xxx:46081] AH01797: client denied by server configuration: /var/www/html/403.shtml

    But then I have no idea any where else to check. Any help please?
    Want to purchase G Suite with lower prices?

    As a Google partner, I can offer you that. Just contact!

  2. #2
    Join Date
    Apr 2013
    Posts
    81
    It looks like something is broken in your Apache Configuration file which needs to be investigated thoroughly by a system administrator. If you have got a managed server then contact your hosting provider for further assistance.
    https://www.24x7servermanagement.com/
    Server Management, Server Security, Server Monitoring.
    India's Leading Managed Service Provider !!

  3. #3
    Join Date
    Apr 2009
    Posts
    2,154
    @24x7server: Your comment is not helpful, and it seems to me you only make the comments to promote your forum signature.

    @gate2vn: Probably not related, but could be: After I upgraded to PHP 7.1.13, on one of my servers I have already two times on two days after each other, experienced that Roundube give this error in browser (URL is on https://server.hostname.tld/roundcube):

    Code:
    Service Unavailable
    
    The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
    
    Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.
    And in /var/log/httpd/error_log I get this:
    Code:
    [Wed Jan 10 11:07:10.167008 2018] [proxy_fcgi:error] [pid 26262:tid 139668105803520] (104)Connection reset by peer: [client 176.74.214.18:52064] AH01075: Error dispatching request to :
    As soon as I do a reload of php-fpm, then Roundcube works correct again. However it seems to happen about one time each day. I have several servers, and it only happen on one of them so far. By the way I am running CentOS 7 and PHP-FPM with OPcache endabled.

  4. #4
    Join Date
    Nov 2004
    Posts
    283
    @ditto: thanks for replying. I tried to rebuild PHP, even downgraded PHP, but it didn't fix. Now, I am checking every included file, hope that I can find out the reason somewhere.

    And I agreed with your comment about that spam!
    Want to purchase G Suite with lower prices?

    As a Google partner, I can offer you that. Just contact!

  5. #5
    Join Date
    Aug 2015
    Posts
    311
    Hi,

    Maybe Apache has no rights to var/www/ ?

    You could try
    Code:
    chmod a+X /var/www
    What is the content of /etc/httpd/conf/extra/httpd-directories.conf ?
    Last edited by Awd; 01-10-2018 at 03:31 AM. Reason: extra question

  6. #6
    Join Date
    Nov 2004
    Posts
    283
    Somehow, the "Require all granted" is not working as expected in extra/httpd-directories.conf. When I changed back to the old config
    Code:
    Order allow,deny
            Allow from all
    Then it resolved the problem. I am using Apache/2.4.29, so I assumed the new config should work, but it didn't. Not sure why yet, but at least, it's the reason.
    Want to purchase G Suite with lower prices?

    As a Google partner, I can offer you that. Just contact!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •