安装 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-xchmod

答案2

您收到的警告表明您收到的目录可以由管理员以外的用户编辑。

测试 apache 以查看它是否有效,在安装了 apache 的机器上打开 Web 浏览器并在 Web 地址栏中输入 localhost,然后就会出现您的 apache 欢迎页面。

如果你需要使用与你的 Apache 机器不同的机器来测试它,请在命令提示符中输入

ifconfig

然后将 inet 地址输入到连接到您的 wifi 网络的任何网络浏览器中。

有任何问题都可以随时提问,我运行自己的 Apache 服务器,因此我可以提供帮助。

相关内容