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 ide
修改/etc/ssh/sshd_config配置文件(注意:这里是sshd_config,而不是ssh_config) vi /etc/ssh/sshd_config 在sshd_config文件中添加一个端口号2222(这里保留22端口,是为了放置假如配置失败的话,还可以使用22端口使用ssh登录,配置完成后,可以删除22端口) Port 22 Port 2222 重启 ssh 服务: systemctl restart sshd.service