ubuntu 18.04 configuratuion Apache2搭建一个web服务器

本文档详细介绍了如何在Ubuntu 18.04上安装Apache2并配置为Web服务器。首先,更新系统并安装Apache、Perl和Git依赖。接着,配置Apache,编辑000-default.conf文件,并将LabelMe从GitHub克隆到Apache目录。然后,运行Makefile,更新文件权限,并重启Apache。此外,还指导了如何修改默认网页,创建/test目录,添加index.html并展示“hello world!”内容,使得可以通过IP地址访问新页面。
摘要由CSDN通过智能技术生成

一、install Apache2

Update and upgrade the Ubuntu distribution.

sudo apt-get update -y

sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade

Install a dependencies for LabelMe. This includes “Apache”, “Perl”, and git.

sudo apt-get install -y \
 apache2 \
 git \
 libapache2-mod-perl2 \
 libcgi-session-perl \
 libapache2-mod-php \
 make \
 php

Configure Apache.

sudo a2enmod include

sudo a2enmod rewrite

sudo a2enmod cgi

Edit /etc/apache2/sites-available/000-default.conf so that the following is the only element in the file.

sudo tee /etc/apache2/sites-available/000-default.conf <<EOL
<Directory "/var/www/html/LabelMeAnnotationTool">
   Options Indexes FollowSymLinks MultiViews Includes ExecCGI
   AddHandler c
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值