ubuntu 18.04 修改Apache默认目录
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默认目录的更多相关文章
- Ubuntu 18.04修改默认源
安装Ubuntu 18.04后,使用国外源太慢了,修改为国内源会快很多. 修改阿里源为Ubuntu 18.04默认的源 备份/etc/apt/sources.list #备份 cp /etc/apt/ ...
- Ubuntu 18.04修改默认源为国内源
安装Ubuntu 18.04后,使用国外源太慢了,修改为国内源会快很多. 修改阿里源为Ubuntu 18.04默认的源 备份/etc/apt/sources.list 备份 cp /etc/apt/s ...
- ubuntu 18.04 修改 固定ip
Linux(ubuntu)下固定IP的方法 写在前面,问:为什么要固定ip.答:要知道固定IP的好处多多,随意搬动,固定共享地址,不怕断网等等 首先,我们要选取一个局域网内的IP,方法如下: 1. ...
- 手动ubuntu 18.04修改登录锁屏界面效果(含登录背景修改)flat-remix
前言 在ubuntu 18.04,可以通过修改/etc/alternatives/gdm3.css来进行修改 本来想直接使用flat-remix主题,但是只有这个登录界面没有达到作者演示的效果,所以手 ...
- Ubuntu 18.04 修改默认源为国内源
1.备份/etc/apt/sources.list #备份 cp /etc/apt/sources.list /etc/apt/sources.list.bak 2.在/etc/apt/sources ...
- Ubuntu 18.04 修改为静态IP
1.进入/etc/netplan目录 cd /etc/netplan 2.查看文件 ls 3.编辑 01-network-manager-all.yaml vim 01-network-manager ...
- Ubuntu 18.04修改IP地址
注:配置/etc/network/interfaces已无用 root@ubuntu:~# vim /etc/netplan/50-cloud-init.yaml network: ethernets ...
- Ubuntu 18.04 安装 Apache, MySQL, PHP7, phpMyAdmin
https://blog.csdn.net/sanve/article/details/80770675
- Ubuntu 18.04 修改gedit的配色方案
下图中的蓝色的注释代码,真是有点让人瞎眼的感觉 去这个网站 https://github.com/mig/gedit-themes/tree/master 下载所有后解压到/usr/share/gtk ...
随机推荐
- PHP代码篇(三)--常用方法
模块下不间断更新,PHP常用方法,欢迎留言! 一.递归删除指定目录下所有文件及文件夹 /** * 递归删除指定目录下所有文件及文件夹 * @param unknown $path,删除路径 */ fu ...
- hisi mmz模块驱动讲解
一.概述 如图所示,在海思平台上将内存分为两个部分:os内存和mmz内存.os内存指:由linux操作系统管理的内存:mmz内存:由mmz驱动模块进行管理供媒体业务单独使用的内存,在驱动加载时可以指定 ...
- v-bind是是否需要绑定某一个类名
v-bind 结合 css样式 结合标签显示是否要显示出某个样式 <p :class="['bg','dx', {'lin':falg}]">{{ msg }}< ...
- 手动O3
#pragma GCC optimize(3,"Ofast","inline") 貌似这玩意并不能在noip考场上用
- c# 第31节 构造函数与析构函数、new关键字作用
本节内容: 1:构造和析构的简介 2:构造函数的定义和使用 3:new关键字的作用 4:析构函数的定义和使用 1:构造和析构的简介 2:构造函数的定义和使用 构造函数: 当实例化的一个对象,就默认执行 ...
- 利用java程序构造mysql测试数据
package com.baidu.mysql;import java.sql.*; public class MysqlJdbc { /** * @param args */ public stat ...
- mysql 插入表情数据报错
mysql 插入表情数据报错 1.编码类型改成:utf8mb4 2.连接类型也要改成:utf8mb4_general_ci 3.在每个保存的前面执行一次 self.cursor.execute('SE ...
- strcpy&memcpy&memmove
strcpy extern char *strcpy(char *dest,char *source); { assert((dest!=NULL)&&(source!=NULL)); ...
- 矩阵快速幂之Kiki & Little Kiki 2
题意是:给出一串01串,每一秒,每个位置得灯会根据左边那个灯得状态进行改变,(第一个得左边为最后一个)如果左边为1,那么自己就会改变状态,左边为0则不用,问n秒改01串的状态 ///// 首先,我们发 ...
- sql 以某个字段分组,另一个字段为参加比较的列,取得前n项的值
假设表A有三个字段 { id int: subject varchar(20): socre int: } 语句为 select * from A x where (select count(*) ...