通过CGI实现在Web页面上执行shell命令
通过CGI实现在Web页面上执行shell命令 实验环境: 腾讯云服务器centos7 Apache-httpd的安装: 使用命令安装 yum install httpd命令安装 yum install httpd #安装成功我们可以看到在/var/目录下会产生一个www的目录,该目录下还包含/cgi-bin/ /html/连个目录 cgi-bin目录下主要存放cgi文件 html目录下主要存放html网页文件 此时可启动httpd服务,查看启动后的状态; [ root@VM_0_16_centos cgi-bin ] # systemctl start httpd.service [ root@VM_0_16_centos cgi-bin ] # systemctl status httpd.service ● httpd.service - The Apache HTTP Server Loaded: loaded ( /usr/lib/systemd/system/httpd.service ; disabled ; vendor preset: disabled ) Active: active ( running ) since Sat 2019-10-12 22:47:27 CST ; 12h ago Docs: man:httpd ( 8 ) man