安裝apache2時出現問題

安裝apache2時出現問題

我想正確安裝 apache 和 mod_wsgi 。

當我嘗試使用安裝 apache2 時

sudo apt-get install apache2

我明白了

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed: 
apache2-data
Suggested packages: 
apache2-doc apache2-suexec-pristine apache2-suexec-custom apache2-utils
The following NEW packages will be installed:
apache2 apache2-data
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/247 kB of archives.
After this operation, 1,194 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package apache2-data.
(Reading database ... 567255 files and directories currently installed.)
Preparing to unpack .../apache2-data_2.4.7-1ubuntu4.9_all.deb ...
Unpacking apache2-data (2.4.7-1ubuntu4.9) ...
Selecting previously unselected package apache2.
Preparing to unpack .../apache2_2.4.7-1ubuntu4.9_amd64.deb ...
Unpacking apache2 (2.4.7-1ubuntu4.9) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
WARN: /etc is world writable!
WARN: /etc is group writable!
WARN: / is world writable!
WARN: / is group writable!
WARN: /usr is world writable!
WARN: /usr is group writable!
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up apache2-data (2.4.7-1ubuntu4.9) ...
Setting up apache2 (2.4.7-1ubuntu4.9) ...
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
WARN: /etc is world writable!
WARN: /etc is group writable!
WARN: / is world writable!
WARN: / is group writable!
WARN: /usr is world writable!
WARN: /usr is group writable!

我是新來的。我可以獲得任何幫助嗎?

答案1

該問題與 Apache2 無關,與您的資料夾權限有關。

使用

ls -l /

這些目錄的權限是什麼,並將它們從 rwxrwxrwx 更改為 rwxr-xr-x 使用chmod

答案2

您收到的警告表示您收到的目錄可以由管理員以外的使用者編輯。

測試 apache 看看它是否運作,在安裝了 apache 的機器上開啟一個 Web 瀏覽器,然後在 Web 網址列中輸入 localhost,你的 apache 歡迎頁面就會出現。

如果您還需要使用與 apache 機器不同的機器來測試它,請在命令提示字元中鍵入

ifconfig

然後將 inet 位址輸入到連接到您的 wifi 網路的任何網路瀏覽器中。

如有任何問題,請隨時提出,我運行自己的 apache 伺服器,因此我可以提供協助。

相關內容