在linux服务器(我用Ubuntu server)配置好网络和LAMP后,配置绑定域名代替IP地址访问,这样更方便访问方便记忆。
直接在/etc/apache2/sites-available/新建一个文件,配置域名如下:
brisk@lan:~$ sudo vim /etc/apache2/sites-available/000-default.conf
brisk@lan:~$ sudo vim /etc/apache2/sites-available/linuxidc (用vim写入并创建linuxidc文件)
<VirtualHost *:80>
ServerName weibingsheng.com
ServerAlias *.weibingsheng.com
DocumentRoot "/var/www/"
ErrorLog "/var/log/apache2/edunuke_error.log"
CustomLog "/var/log/apache2/edunuke_accesses.log" common
</VirtualHost>
brisk@lan:~$ sudo /etc/init.d/apache2 restart
* Restarting web server apache2
[Sat Jun 03 03:29:51.612378 2017] [so:warn] [pid 4255] AH01574: module php5_module is already loaded, skipping
[ OK ]