ubuntu 18.04 修改Apache默认目录

  • 安装是直接运行

    sudu apt install apache2
  • 安装之后要修改目录

    vi /etc/apache2/sites-available/000-default.conf
  • 我将里面的内容修改成下面
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com ServerAdmin webmaster@localhost
DocumentRoot /root/myhtml # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined # For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

然后保存退出重启即可

ubuntu 18.04 修改Apache默认目录的更多相关文章

  1. Ubuntu 18.04修改默认源

    安装Ubuntu 18.04后,使用国外源太慢了,修改为国内源会快很多. 修改阿里源为Ubuntu 18.04默认的源 备份/etc/apt/sources.list #备份 cp /etc/apt/ ...

  2. Ubuntu 18.04修改默认源为国内源

    安装Ubuntu 18.04后,使用国外源太慢了,修改为国内源会快很多. 修改阿里源为Ubuntu 18.04默认的源 备份/etc/apt/sources.list 备份 cp /etc/apt/s ...

  3. ubuntu 18.04 修改 固定ip

    Linux(ubuntu)下固定IP的方法   写在前面,问:为什么要固定ip.答:要知道固定IP的好处多多,随意搬动,固定共享地址,不怕断网等等 首先,我们要选取一个局域网内的IP,方法如下: 1. ...

  4. 手动ubuntu 18.04修改登录锁屏界面效果(含登录背景修改)flat-remix

    前言 在ubuntu 18.04,可以通过修改/etc/alternatives/gdm3.css来进行修改 本来想直接使用flat-remix主题,但是只有这个登录界面没有达到作者演示的效果,所以手 ...

  5. Ubuntu 18.04 修改默认源为国内源

    1.备份/etc/apt/sources.list #备份 cp /etc/apt/sources.list /etc/apt/sources.list.bak 2.在/etc/apt/sources ...

  6. Ubuntu 18.04 修改为静态IP

    1.进入/etc/netplan目录 cd /etc/netplan 2.查看文件 ls 3.编辑 01-network-manager-all.yaml vim 01-network-manager ...

  7. Ubuntu 18.04修改IP地址

    注:配置/etc/network/interfaces已无用 root@ubuntu:~# vim /etc/netplan/50-cloud-init.yaml network: ethernets ...

  8. Ubuntu 18.04 安装 Apache, MySQL, PHP7, phpMyAdmin

    https://blog.csdn.net/sanve/article/details/80770675

  9. Ubuntu 18.04 修改gedit的配色方案

    下图中的蓝色的注释代码,真是有点让人瞎眼的感觉 去这个网站 https://github.com/mig/gedit-themes/tree/master 下载所有后解压到/usr/share/gtk ...

随机推荐

  1. python 计算 对象 占用大小

    # 这里主要是计算文件内容(str)的大小即: 统计空间占用情况, 并转换宜读单位 K,M def gen_atta_size(con): # 参数可以是任意数据类型 if con: size_b = ...

  2. Dynamics CRM中的注释(Note)及RollupRequest消息初探

    关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复161或者20151015可方便获取本文,同时可以在第一时间得到我发布的最新的博文信息,follow me! 注释,这个实体的架构名称是Ann ...

  3. 微信小程序使用weui构建搜索栏(searchbar)+导航(navbar)

    首先需要在lib目录中添加weui.wxss.searchbar和navbar结合主要解决两者的层次问题,即搜索框输入时,下方的检索结果能够覆盖住navbar.下面就开始发码啦: (1)wxml部分: ...

  4. LayoutSubviews的调用

    1.当view被添加到另一个view上时调用 2.布局子控件时调用 3.屏幕旋转的时候调用 4.当view的尺寸大小改变的时候调用

  5. [b0023] python 归纳 (九)_html解析-lxml

    # -*- coding: utf-8 -*- """ 学习lxml解析网页 程序功能: 解析 360影视 电影排行榜中的信息 https://www.360kan.co ...

  6. SRDC - ORA-1552: Checklist of Evidence to Supply (Doc ID 1681333.1)

    SRDC - ORA-1552: Checklist of Evidence to Supply (Doc ID 1681333.1) Action Plan 1. Execute srdc_db_u ...

  7. Docker 类面试题(常见问题)

    Docker 常见问题汇总   镜像相关 1.如何批量清理临时镜像文件? 可以使用sudo docker rmi $(sudo docker images -q -f danging=true)命令 ...

  8. pointNet代码

    介绍 组成 1.PointNet classification network分类网络 part segmentation network 数据集 1.point clouds sampled fro ...

  9. Hbulder 调试安卓app

    目前开发app有原生开发和web开发两种方式,各有各的优势和劣势,利用web技术开发app可以只用写一套代码,即可以在Android和ios同时应用,比较方便和快捷,有很多中不同的开发方式,例如cor ...

  10. 第六章 HTTP首部

    第六章 HTTP首部 HTTP首部包括:请求行<方法,URI,版本号>/响应行<版本,状态码>.请求/响应首部字段.通用首部字段.实体首部字段 1.HTTP首部字段 HTTP首 ...