programme cgi dans htdocs

  • Bonjour


    si je veux mettre un programme perl directement dans htdocs cela fonctionne pas.
    Avec ispCP, on pouvait rajoutait dans domaine.com.conf:

    Code
    1. <location / >
    2. Options +Includes +Indexes +ExecCGI +FollowSymLinks symlinksifownermatch
    3. AddHandler cgi-script .cgi
    4. AddHandler cgi-script .pl
    5. #AllowOverride AuthConfig All
    6. Options ExecCGI symlinksifownermatch
    7. </location>


    mais là, cela ne fonctionne plus.
    Y'a t-il un moyen de faire fonctionner les cgi dans htdocs?


    merci
    stephan

  • Bonsoir,


    Exemple pour le domaine another.bbox.nuxwin.com


    Fichier /etc/apache2/imscp/another.bbox.nuxwin.com.conf:


    Code
    1. # Custom Apache configuration for another.bbox.nuxwin.com## Any changes made to this file will be preserved on update.# i-MSCP doesn't check the contents of this file.## This file should NOT be deleted.<Directory /var/www/virtual/another.bbox.nuxwin.com/htdocs> AllowOverride AuthConfig Indexes Limit Options=Indexes,MultiViews \ Fileinfo=RewriteEngine,RewriteOptions,RewriteBase,RewriteCond,RewriteRule Nonfatal=Override DirectoryIndex index.cgi index.pl index.py index.rb Options FollowSymLinks ExecCGI AddHandler cgi-script .cgi .pl .py .rb Require all granted</Directory>

    Ceci étant fait, rechargez Apache2:


    Shell-Script
    1. service apache2 reload

    Résultat


    /var/www/virtual/another.bbox.nuxwin.com/htdocs/index.pl:

    Perl
    1. #!/usr/bin/perlprint <<'EOT';Content-Type: text/html<!DOCTYPE html><html> <head> <title>Hello, world!</title> </head><body> <h1>Hello, world!</h1></body></html>EOT


    Shell-Script
    1. root@jessie:/var/www/virtual/another.bbox.nuxwin.com/htdocs# ls -la
    2. total 20
    3. drwxr-x--- 3 vu2011 vu2011 4096 sept. 29 17:18 .
    4. drwxr-x--- 9 vu2011 vu2011 4096 sept. 25 14:36 ..
    5. -r-xr-x--- 1 vu2011 vu2011 28 sept. 29 17:16 index.php
    6. -r-xr-x--- 1 vu2011 vu2011 216 sept. 29 17:10 index.pl
    7. drwxr-xr-x 2 vu2011 vu2011 4096 sept. 25 14:36 .well-known


    cgi_in_htdocs.png

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • merci j'avais pas trouvé ce post


    je dois avoir un autre pb car quand je restart apache j'ai
    /etc/init.d/apache2 restart
    [....] Restarting apache2 (via systemctl): apache2.serviceJob for apache2.service failed. See 'systemctl status apache2.service' and 'journalctl -xn' for details.
    failed!

  • apache2ctl -t ???

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • que donne le resultat de journalctl -xn ?

    - Distribution: Debian | Release: 8.9 | Codename: jessie
    - i-MSCP Version: i-MSCP 1.5.3 | Build: 2018120800 | Codename: Ennio Morricone
    - Plugins installed: ServerDefaultPage (v. 1.3.0),Postgrey (v. 1.3.0), PolicydWeight (v. 1.3.0), ClamAV (v. 1.3.0), Mailgraph (v 1.1.1), OpenDKIM (v 2.0.0), RoundCubePlugins (v 2.0.2), LetsEncrypt (v 3.5.0), PhpSwitcher (v 4.0.3), InstantSSH (v 5.0.1), CronJobs (v 1.4.1), PolicydSPF (v 1.2.0), Postscreen (v 1.2.0), Monitorix (v 1.2.2) & SpamAssassin (v 2.0.1)

  • # journalctl -xn
    -- Logs begin at mar. 2017-09-19 17:02:11 CEST, end at ven. 2017-09-29 18:58:23
    sept. 29 18:56:18 web-8 sshd[30667]: PAM 2 more authentication failures; logname
    sept. 29 18:57:09 web-8 sshd[30669]: Invalid user goldtourist from 203.249.22.18
    sept. 29 18:57:09 web-8 sshd[30669]: input_userauth_request: invalid user goldto
    sept. 29 18:57:09 web-8 sshd[30669]: pam_unix(sshd:auth): check pass; user unkno
    sept. 29 18:57:09 web-8 sshd[30669]: pam_unix(sshd:auth): authentication failure
    sept. 29 18:57:11 web-8 sshd[30669]: Failed password for invalid user goldtouris
    sept. 29 18:57:11 web-8 sshd[30669]: Connection closed by 203.249.22.187 [preaut
    sept. 29 18:58:21 web-8 postfix/smtpd[30672]: connect from unknown[80.82.78.61]
    sept. 29 18:58:23 web-8 postfix/smtpd[30672]: warning: unknown[80.82.78.61]: SAS
    sept. 29 18:58:23 web-8 postfix/smtpd[30672]: disconnect from unknown[80.82.78.6
    lines 1-11/11 (END)

  • et systemctl -l status apache2.service ?

    - Distribution: Debian | Release: 8.9 | Codename: jessie
    - i-MSCP Version: i-MSCP 1.5.3 | Build: 2018120800 | Codename: Ennio Morricone
    - Plugins installed: ServerDefaultPage (v. 1.3.0),Postgrey (v. 1.3.0), PolicydWeight (v. 1.3.0), ClamAV (v. 1.3.0), Mailgraph (v 1.1.1), OpenDKIM (v 2.0.0), RoundCubePlugins (v 2.0.2), LetsEncrypt (v 3.5.0), PhpSwitcher (v 4.0.3), InstantSSH (v 5.0.1), CronJobs (v 1.4.1), PolicydSPF (v 1.2.0), Postscreen (v 1.2.0), Monitorix (v 1.2.2) & SpamAssassin (v 2.0.1)