Cannot run cgi, show plain text only (Ubuntu 13.10 Apache 2.4)

前端 未结 6 1267
盖世英雄少女心
盖世英雄少女心 2021-02-07 10:56

I just install Ubuntu 13.10 and I am trying to install Apache. But when I tried to run a perl file in cgi-bin, the browser showed only plain text.

My default.conf of Apa

6条回答
  •  青春惊慌失措
    2021-02-07 11:43

    Expanding on the answer from @tops.

    Try sudo a2enmod cgi, if you have already tried following a bunch of tutorials like Apache Tutorial: Dynamic Content with CGI, Ubuntu HTTDP or How to Install Apache2 webserver with PHP, CGI, and Perl Support in Ubuntu Server, and still cannot figure out what is missing from them.

    Then restart apache!

    Which may be done with:

    sudo /etc/init.d/apache2 restart
    sudo apache2ctl restart
    sudo service apache2 restart <- try this first

    This worked for me on Ubuntu 13.10.


    New commands to users coming from RedHad based distributions:

    • Modules
      • a2enmod
      • a2dismod
    • Configurations
      • a2enconf
      • a2disconf
    • Virtual Sites
      • a2ensite
      • a2dissite

    Remember, the main configuration file is /etc/apache2/apache2.conf by default, and individual configuration components for modules and websites are in separate files.


    EDIT: Expanded with details as to why people coming to this page may be having difficulties with enabling Apache CGI on Ubuntu.

提交回复
热议问题