d8u*_*8uv 3 debian virtualhost apache-2.2
我刚刚重新安装了 Apache2(Debian 2.4.4-6,libapache2-mod-php5 5.5.0~rc3+dfsg),当它重置时,我所有的虚拟主机都坏了。想知道我是否不小心清除了我的 vhost 配置,我去检查:
d8uv@ddd /etc/apache2/sites-available
$ sudo ls -l
total 32
-rw-r--r-- 1 root root 798 Jun 2 08:27 000-default.conf
-rw-r--r-- 1 root root 394 Jul 9 2012 domain1.com
-rw-r--r-- 1 root root 422 Jul 26 2012 domain2.com
-rw-r--r-- 1 root root 427 Apr 28 2010 domain3.com
-rw-r--r-- 1 root root 400 Apr 28 2010 domain4.com
-rw-r--r-- 1 root root 393 Oct 26 2010 domain5.com
-rw-r--r-- 1 root root 6432 Jun 2 08:27 default-ssl.conf
Run Code Online (Sandbox Code Playgroud)
所有这些,让我们看看我是否可以启用它们:
d8uv@ddd /etc/apache2/sites-available
$ sudo a2ensite
Your choices are: 000-default default-ssl
Which site(s) do you want to enable (wildcards ok)?
Run Code Online (Sandbox Code Playgroud)
因此,配置文件存在,但 a2ensite 看不到它们。也许 vhosting 在主配置文件中关闭了?
d8uv@ddd /etc/apache2/sites-available
$ tail /etc/apache2/apache2.conf
# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.
# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf
# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Run Code Online (Sandbox Code Playgroud)
Den*_*ker 13
仔细查看包含语句。你看到了吗?不?
它包括sites-enabled/*.conf,因此重命名您的配置文件,使其具有 .conf 扩展名。
| 归档时间: |
|
| 查看次数: |
8961 次 |
| 最近记录: |