【发布时间】:2014-04-14 13:00:19
【问题描述】:
我在我的 ubuntu 服务器 12 apache2 上设置虚拟主机时遇到问题。当我尝试访问stemitest.com 时,apache 会指向000-default.conf (/var/www/) 中的DocumentRoot。我做错了什么?
cat /etc/apache2/sites-available/000-default.conf
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
cat /etc/apache2/sites-available/stemitest.com.conf
<virtualhost *:80>
ServerAdmin donotreply@epbfi.com
ServerName www.stemitest.com
ServerAlias stemitest.com
DirectoryIndex index.html
DocumentRoot /var/www/stemitest.com
LogLevel warn
ErrorLog /var/apachelogs/error.log
CustomLog /var/apachelogs/access.log combined
</virtualhost>
cat /etc/apache2/apache2.conf
...
Include /etc/apache2/sites-enabled/
NameVirtualHost *:80
<ifmodule mod_ssl.c>
NameVirtualHost *:443
</ifmodule>
【问题讨论】:
标签: html redirect apache2 virtualhost