在apache2.4下配置了如下代码文件
但是apache报错
(另外网上教程说绑定host文件,我并不知道这是什么东西。。)
配置部分代码如下
apache2.conf
Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
NameVirtualHost smilencer.me
ServerName www.smilencer.me DocumentRoot "/var/www/wordpress"Options FollowSymLinks AllowOverride All Require all granted
ServerName www.whatare.me DocumentRoot "/var/www/What_Are_You_Doing/map"
Options FollowSymLinks AllowOverride All Require all granted
NameVirtualHost whatare.me
mytest.conf
这里给你一个参考,你可以用你自己的域名替换掉[YOUR_DOMAIN_NAME]
<VirtualHost *:80> ServerAdmin admin@[YOUR_DOMAIN_NAME].com DocumentRoot "/var/www/dev/doc" ServerName [YOUR_DOMAIN_NAME].com ServerAlias [YOUR_DOMAIN_NAME].com ErrorLog logs/[YOUR_DOMAIN_NAME].com-error_log </VirtualHost>