Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Apache2 config problem?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
stychokiller
Posts: 2
Joined: 2021-12-07 05:47

Apache2 config problem?

#1 Post by stychokiller »

I made two test files in /var/www/html -- one is called 'test.cgi, ' and the other is called 'test.html.'
They both contain the same contents:

Code: Select all

<!DOCTYPE html> <!-- PUBLIC "-//W3C//DTD HTML 3.2//EN"> -->

<html>
    <head>
        <title>Testing basic HTML script file:</title>
    </head>
    <body>
    <!-- Start this html page with "http://localhost/phpExamples/firstPHPWebsite.html"
         Otherwise, your browser won't recognize the php code correctly!
    -->

      <a href="scanDir.php"> Perform scan Directory</a><BR>
      <a href="scanDir2.php"> Perform scan Directory 2</a><BR>
      <a href="scanDir3.php"> Perform scan Directory 3</a><BR>
      <a href="scanDir4.php"> Perform scan Directory 4</a><BR>
      <a href="login.php"> Click here to login </a><BR>
      <a href="register.php"> Click here to register </a>
    </body>
</html>
The file called test.cgi runs correctly, but the test.html, as well as every other file with a suffix of .html ALL result in "Internal Server Error" being displayed.

The following message was found in /var/log/apache2:
AH10034: The mpm module (prefork.c) is not supported by mod_http2. The mpm determines how things are processed in your server. HTTP/2 has more demands in this regard and the currently selected mpm will just not do. This is an advisory warning. Your server will continue to work, but the HTTP/2 protocol will be inactive.

As well as:
[cgi:error] [pid 29061] [client ::1:54424] AH01215: (13)Permission denied: exec of '/var/www/html/test.html' failed: /var/www/html/test.html
[Mon Dec 06 23:39:58.623806 2021] [cgi:error] [pid 29061] [client ::1:54424] End of script output before headers: test.html

I've tried using mods-available/mpm_event.* and mods-available/mpm_worker.*, but neither of them did any better than mods-available/mpm_prefork.*

Any help with this would be appreciated. (using PHP7.3, perl and mysql)

arzgi
Posts: 1183
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Apache2 config problem?

#2 Post by arzgi »

Did you even read those error messages before posting?

Code: Select all

[cgi:error] [pid 29061] [client ::1:54424] AH01215: (13)Permission denied: exec of '/var/www/html/test.html' failed: /var/www/html/test.html
[Mon Dec 06 23:39:58.623806 2021] [cgi:error] [pid 29061] [client ::1:54424] End of script output before headers: test.html
Permission problem, if you don't know what that means use search engine.

And problem in your script. don't know how could that be said better :mrgreen:

User avatar
donald
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 1041
Joined: 2021-03-30 20:08
Has thanked: 185 times
Been thanked: 240 times

Re: Apache2 config problem?

#3 Post by donald »

arzgi wrote: 2021-12-07 11:37 Did you even read those error messages before posting?

Code: Select all

[cgi:error] [pid 29061] [client ::1:54424] AH01215: (13)Permission denied: exec of '/var/www/html/test.html' failed: /var/www/html/test.html
[Mon Dec 06 23:39:58.623806 2021] [cgi:error] [pid 29061] [client ::1:54424] End of script output before headers: test.html
Permission problem, if you don't know what that means use search engine.

And problem in your script. don't know how could that be said better :mrgreen:
Be nice. Not everyone has the same experience or skill level as us old salty admins. :)





@arzgi , I do the most basic of setups with apache and admit to googling every single iota during the setup process, no help from me unfortunately, hopefully someone comes along.
Typo perfectionish.


"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank

stychokiller
Posts: 2
Joined: 2021-12-07 05:47

Re: Apache2 config problem?

#4 Post by stychokiller »

The permissions on both files are identical (0755), which is what is recommended. This is why the apache2 error message is less than helpful.
Do the modules and libraries have to have looser permissions as well?

Post Reply