403 访问被拒绝

403 访问被拒绝

我按照以下说明安装了 Redminehttps://izolabs.tech/2021/11/install-redmine-on-ubuntu.html在网络服务器上。Redmine 现在可以在 withsystem.de/redmine 上运行。但是当我访问 withsystem.de 时,我看不到正常的 apache2-testsite,而是看到 403 错误(您可以自己检查)。我该怎么做才能解决这个问题?说明是否不完整或包含错误?

这是重新启动 apache2 后的日志

[ N 2022-03-23 01:28:57.3097 2937/T1 age/Wat/WatchdogMain.cpp:1373 ]: Starting Passenger watchdog...
[ N 2022-03-23 01:28:57.3402 2940/T1 age/Cor/CoreMain.cpp:1340 ]: Starting Passenger core...
[ N 2022-03-23 01:28:57.3406 2940/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2022-03-23 01:28:57.3494 2940/T1 age/Cor/CoreMain.cpp:1015 ]: Passenger core online, PID 2940

[ N 2022-03-23 01:28:57.3805 2940/T3 age/Cor/CoreMain.cpp:670 ]: Signal received. Gracefully shutting down... (send signal 2 more time(s) to force shutdown)
[ N 2022-03-23 01:28:57.3805 2940/T1 age/Cor/CoreMain.cpp:1245 ]: Received command to shutdown gracefully. Waiting until all clients have disconnected...
[ N 2022-03-23 01:28:57.3807 2940/T9 Ser/Server.h:901 ]: [ApiServer] Freed 0 spare client objects
[ N 2022-03-23 01:28:57.3807 2940/T9 Ser/Server.h:558 ]: [ApiServer] Shutdown finished
[ N 2022-03-23 01:28:57.3807 2940/T3 Ser/Server.h:901 ]: [ServerThr.1] Freed 0 spare client objects
[ N 2022-03-23 01:28:57.3807 2940/T3 Ser/Server.h:558 ]: [ServerThr.1] Shutdown finished
[ N 2022-03-23 01:28:57.4090 2957/T1 age/Wat/WatchdogMain.cpp:1373 ]: Starting Passenger watchdog...
[ N 2022-03-23 01:28:57.4375 2962/T1 age/Cor/CoreMain.cpp:1340 ]: Starting Passenger core...
[ N 2022-03-23 01:28:57.4377 2962/T1 age/Cor/CoreMain.cpp:256 ]: Passenger core running in multi-application mode.
[ N 2022-03-23 01:28:57.4436 2962/T1 age/Cor/CoreMain.cpp:1015 ]: Passenger core online, PID 2962
[Wed Mar 23 01:28:57.447247 2022] [mpm_event:notice] [pid 2955:tid 139861455912000] AH00489: Apache/2.4.41 (Ubuntu) Phusion_Passenger/6.0.12 configured -- resuming normal operations
[Wed Mar 23 01:28:57.447414 2022] [core:notice] [pid 2955:tid 139861455912000] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 23 01:28:57.450530 2022] [mpm_event:alert] [pid 2972:tid 139861448599296] (11)Resource temporarily unavailable: AH03104: apr_thread_create: unable to create worker thread
[ N 2022-03-23 01:28:57.4565 2940/T1 age/Cor/TelemetryCollector.h:531 ]: Message from Phusion: End time can not be before or equal to begin time
[ N 2022-03-23 01:28:57.4775 2940/T1 age/Cor/CoreMain.cpp:1325 ]: Passenger core shutdown finished
[ N 2022-03-23 01:28:59.5843 2962/T8 age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)
[Wed Mar 23 01:29:40.158402 2022] [autoindex:error] [pid 2973:tid 139861281453824] [client 87.187.170.33:45328] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
[Wed Mar 23 01:42:04.846173 2022] [autoindex:error] [pid 2973:tid 139861239490304] [client 183.136.226.3:39524] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
[Wed Mar 23 01:42:06.531652 2022] [autoindex:error] [pid 2973:tid 139861189134080] [client 183.136.226.3:11043] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
[Wed Mar 23 01:42:54.847205 2022] [autoindex:error] [pid 2973:tid 139861273061120] [client 45.146.165.37:48062] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

答案1

您访问根网站时出现 403 的原因是您完全按照说明操作。步骤 5 的第一部分就是您出现 403 的原因:

重命名 HTML 文件

error.log显示此消息:

No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

这意味着当人们访问根域时,Apache 不会向人们显示任何内容,并且由于指令OptionsOptions -Indexes -MultiViews在您的 Apache 配置中设置),您将看不到目录列表。

如果您想恢复默认的 Apache 登陆页面,您可以将其重命名index.html.bakindex.html。或者,如果您希望基础域显示不同的文件集,您可以按照自己的意愿构建网站。

相关内容