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. mysql 容灾备份

    跨服务器备份: 服务器A:192.168.5.193 测试数据库TestDB 服务器B:192.168.5.194 目标:将服务器A上的测试数据库定时备份到服务器B中 需要技术:mysqldump + ...

  2. Android框架Volley使用:Json请求实现

    首先我们在项目中导入这个框架: implementation 'com.mcxiaoke.volley:library:1.0.19' 在AndroidManifest文件当中添加网络权限: < ...

  3. PL/SQL编写的SQL语句插入SqlPlus时,报错 PLS-00302

    最近刚开始用PL/SQL,然后发现写SQL语句时,运行的时候,会对表中的字段报错. 好像是对字段的使用有问题 原来写的错误代码大概像这样 DECLARE xuehao XSB.id% TYPE; BE ...

  4. android.os.Parcel.readByteArray NullPointerException

    报错信息: E/AndroidRuntime( 1626): java.lang.NullPointerException E/AndroidRuntime( 1626): at android.os ...

  5. [PHP] Ubuntu快速安装起PHP7.4

    先安装一下这个命令 add-apt-repositoryapt-get install software-properties-common 添加第三方源:add-apt-repository ppa ...

  6. [日常] lscpu查看cpu的详细信息

    查看自己电脑的cpu的详细信息 root@tao-PC:/home/tao# lscpu Architecture: x86_64 CPU op-mode(s): -bit, -bit Byte Or ...

  7. 08 在设备树里描述platform_device【转】

    转自:https://blog.csdn.net/jklinux/article/details/78575281 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原 ...

  8. 5. Vue - 小清单实例

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. 字符设备驱动程序之poll机制(韦大仙)

    明确为什么要引用poll机制? while(1) { read(fd,&key_val,1);//如果没有按键按下,它会一直在等待.现在想做这么一件事情:如果5s后,没有按键按下,它就会返回. ...

  10. 剑指Offer-17.树的子结构(C++/Java)

    题目: 输入两棵二叉树A,B,判断B是不是A的子结构.(ps:我们约定空树不是任意一个树的子结构) 分析: 注意这道题是判断B是不是A的子结构,而不是子树,这一点要注意下,且空树不是任意一个树的子结构 ...