Назад | Перейти на главную страницу

Как протестировать fcgi?

Я пытаюсь использовать foo.pl, но используя /usr/lib/fcgi-bin как мой каталог fcgi в данной директиве. я сделал foo.pl исполняемый файл и после редактирования моего apache2.conf Я перезапустил apache2. Но если я запустил свой браузер и перейду в http://localhost/fcgi-bin/foo.pl, Я получаю 404,

Запрошенный URL /fcgi-bin/foo.pl не найден на этом сервере.

Это мое /etc/apache2/apache2.conf:

Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5


User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn

IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf

<Directory />
    Options FollowSymLinks
        AllowOverride None
    Require all denied
</Directory>

<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>

<Directory /var/www/>
    Options FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

AccessFileName .htaccess

<FilesMatch "^\.ht">
    Require all denied
</FilesMatch>

<Directory /usr/lib/fcgi-bin/>
        SetHandler fcgid-script
        Options +ExecCGI

        # Customize the next two directives for your requirements.
        Order allow,deny
        Allow from all
</Directory>

LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf

Загружены следующие модули:

$ sudo a2query -m
[sudo] Passwort für xXx: 
authz_host (enabled by maintainer script)
proxy_fcgi (enabled by site administrator)
negotiation (enabled by maintainer script)
filter (enabled by maintainer script)
access_compat (enabled by maintainer script)
authz_core (enabled by maintainer script)
deflate (enabled by maintainer script)
authn_file (enabled by maintainer script)
php7.0 (enabled by maintainer script)
authz_user (enabled by maintainer script)
authnz_fcgi (enabled by site administrator)
mime (enabled by maintainer script)
proxy (enabled by site administrator)
mpm_prefork (enabled by site administrator)
dir (enabled by maintainer script)
alias (enabled by maintainer script)
auth_basic (enabled by maintainer script)
setenvif (enabled by maintainer script)
cgi (enabled by site administrator)
env (enabled by maintainer script)
autoindex (enabled by maintainer script)
authn_core (enabled by maintainer script)
status (enabled by maintainer script)

Я не вижу подсказки в этом примере или что мне не хватает?

Любой ответ приветствуется.