Welcome to the Linux Foundation Forum!

Failing to connect apache2 with ScriptAlias | Lab 8.1

Options

Hi guys,

I'm trying to set up a ScriptAlias on an apache2 server, but when I try to connect to it using the alias, I get a Forbidden error:

This is my /etc/apache2/apache.conf:

cgi.load is enabled on /etc/apache2/mods-enabled/:

This is the /new-cgi/foo.cgi file and its permissions:

And if I do sudo su www-data -s /bin/bash, I can access the file and execute it without any problems.

There are some warnings (not fatal) in the logs plus a AH01630: client denied by server configuration which I believe is the cause of the problem but I can't figure out how to solve it:

My version of Apache2 is 2.4.41

Thanks in advance for any help!

Answers

  • cdgmachado
    Options

    SOLUTION:

    I was missing a "/" at the end of my second arg on ScriptAlias (/new-cgi/)

  • lee42x
    lee42x Posts: 380
    Options

    The foo.cgi needs other-read permission

    Lee .

Categories

Upcoming Training