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

前端 未结 6 1259
盖世英雄少女心
盖世英雄少女心 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:40

    Steps to install Apache on Ubuntu 13.10:

    • sudo apt-get install apache2
    • sudo service apache2 start

    Steps to test Apache on Ubuntu 13.10:

    • Visit http://your-host-here.com/ (or whatever your host is configured as).
    • See the "It works" web page.

    Steps to use CGI programs under Apache on Ubuntu 13.10:

    • None. CGI is configured out of the box.

    Steps to test CGI programs under Apache on Ubuntu 13.10:

    • Edit a file in /usr/lib/cgi-bin/ (e.g. /usr/lib/cgi-bin/test)
    • Add some Perl code (e.g. your code from above)
    • sudo chmod +x /usr/lib/cgi-bin/test
    • Visit http://your-host-here.com/cgi-bin/test

    Note: "your-host-here.com" might well be "localhost", but SO won't let me use that in a URL :-/

提交回复
热议问题