无法访问 localhost,检查 apache 状态时出错

无法访问 localhost,检查 apache 状态时出错

我正在运行 Linux Mint Maya。当我进入http://localhost/浏览器时,我收到一条“无法连接”消息。我尝试过卸载并重新安装 apache,但没有成功。当我进入sudo service apache2 status终端时,我得到/etc/init.d/apache2: 51: .: Can't open /etc/apache2/envvars

这是内容/etc/apt/sources.list

deb http://packages.linuxmint.com/ maya main upstream import
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ precise partner

# deb http://archive.getdeb.net/ubuntu precise-getdeb apps
# deb http://archive.getdeb.net/ubuntu precise-getdeb games

当我运行更新管理器时,我收到了一个错误,但我认为这并不重要,所以我一直忽略它。这是错误:

There is no public key available for the following key IDs:
1397BC53640DB551Failed to fetch http://ppa.launchpad.net/heyarje/libav-       11/ubuntu/dists/precise/main/source/Sources  404  Not Found
Failed to fetch http://ppa.launchpad.net/heyarje/libav-11/ubuntu/dists/precise/main/binary-i386/Packages  404  Not Found
Some index files failed to download. They have been ignored, or old ones used instead.

我究竟做错了什么?

答案1

可能是与旧的配置文件冲突。尝试 :

sudo apt-get purge apache2
sudo apt-get install apache2

答案2

我让阿帕奇工作了。我不完全确定如何,但我认为这与运行更新发行版有关。之后,我能够运行之前推荐的相同命令,这一次,它们起作用了。

相关内容