标签:vim efault 目录 virt rest err service 127.0.0.1 ubunt
在Ubuntu 要配置 \var\www\loelve 目录为 www.loelve.xyz 为例
一、打开:\etc\hosts文件:sudo vim \etc\hosts
添加:127.0.0.1 www.loelve.xyz
二、打开:\etc\apach2\sites-available\000-default.conf文件:sudo vim \etc\apach2\sites-available\000-default.conf
添加:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/loelve/public
ServerName www.loelve.xyz
<Directory "/var/www/loelve/public">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
三、重启apache
sudo service apache2 restart
标签:vim efault 目录 virt rest err service 127.0.0.1 ubunt
原文地址:https://www.cnblogs.com/zydtm/p/9900320.html