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. Typescript基础(1)——数据类型

    前言 这是开始学习Typescript的一些笔记,涉及的都是很基础的知识点.大神们请绕路或者欢迎指点.今天开始第一部分数据类型的学习. 数据类型 Typescript中为了使代码编写更加规范,更加易于 ...

  2. JavaScript初探 四 (程序结构)

    JavaScript 结构 JavaScript 程序结构 JavaScript支持几乎和C语言一样的程序结构 分支结构 循环结构 分支结构 条件分支 if-else if语句:判断条件为true则执 ...

  3. [转]关于maven pom.xml中dependency type 为pom的应用

    原文地址:http://blog.csdn.net/yao123long/article/details/49925659 dependency为什么会有type为pom,默认的值是什么?depend ...

  4. [20190522]DISABLE TABLE LOCK.txt

    [20190522]DISABLE TABLE LOCK.txt --//如果禁止table lock时,一些ddl操作会被禁止.但是我有点吃惊的是增加字段不受限制.--//通过测试说明问题. 1.环 ...

  5. rabbitmq和kafka大概比较

    两者都是一个分布式架构 kafka 具有较高的吞吐量,rabbimq 吞吐量较小 rabbitmq 的可靠性更好,确认机制(生产者和 exchange,消费者和队列),支持事务,但会造成阻塞,委托(添 ...

  6. Linux 解决Deepin深度系统无法在root用户启动Google Chrome浏览器的问题

    解决Deepin无法在root用户启动Google Chrome浏览器的问题,步骤如下. 前提:如何用root用户登录系统?编辑 vim /etc/lightdm/lightdm.conf , 找到并 ...

  7. [Linux] 使用mount来挂载设备到目录

    一般情况下直接mount 设备路径 目录路径,就可以了.umount 设备名,就可以卸载这个设备了使用lsblk -f可以查看挂载的设备,以及这些设备的文件系统. root@tao-PC:/boot# ...

  8. C++ class外的==重载,判断相等,测试等于,重载示例。二元操作符

    #include <iostream> // overloading "operator == " outside class // == 是二元操作符 /////// ...

  9. 【CSP-S 2019】D2T1 Emiya 家今天的饭

    Description 传送门 Solution 算法1 32pts 爆搜,复杂度\(O((m+1)^n)\) 算法2 84pts 裸的dp,复杂度\(O(n^3m)\) 首先有一个显然的性质要知道: ...

  10. verilog 常见单元描述

    半加器: //行为级建模 module half_adder2(a, b, sum, c_out); input a, b; output sum, c_out; assign {c_out, sum ...