無法存取 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

我讓阿帕契工作了。我不完全確定如何,但我認為這與運行更新發行版有關。之後,我能夠運行之前推薦的相同命令,這一次,它們起作用了。

相關內容