我正在尝试设置一个 Nextcloud 服务器来监听 Apache2 上 SSL 上的非标准端口。
操作系统:Debian 9.9.0
uname -a:Linux cactuar 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 GNU/Linux
阿帕奇-v:Apache/2.4.25 (Debian)
php --版本:PHP 7.3.11-1+0~20191026.48+debian9~1.gbpf71ca0 (cli) (built: Oct 26 2019 14:18:28) ( NTS )
我的站点-当前可用:
NameVirtualHost 0.0.0.0:7580
<VirtualHost *:7580>
DocumentRoot /var/www/nextcloud
ServerName cloud.example.com
<Directory "/var/www/nextcloud">
allow from all
Options None
Require all granted
</Directory>
SSLEngine on
SSLProtocol +TLSv1.1 +TLSv1.2
SSLCertificateFile /var/cloud_ssl/certificate.crt
SSLCertificateKeyFile /var/cloud_ssl/private.key
SSLVerifyClient none
LogLevel info
SSLCACertificateFile /var/cloud_ssl/ca_bundle.crt
</VirtualHost>
当我尝试访问我的网站时https://cloud.example.com:7580我得到:
Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple
times, please include the technical details below in your report.
More details can be found in the server log.
apache2 错误日志设置为调试级别,并根据我的要求包含以下内容:
[Tue Dec 24 11:39:12.283854 2019] [ssl:info] [pid 23619] [client 10.10.0.1:3616] AH01964: Connection to child 0 established (server cloud.example.com:443)
[Tue Dec 24 11:39:12.284437 2019] [ssl:info] [pid 23620] [client 10.10.0.1:17338] AH01964: Connection to child 1 established (server cloud.example.com:443)
[Tue Dec 24 11:39:13.177501 2019] [watchdog:debug] [pid 23880] mod_watchdog.c(563): AH02980: Watchdog: nothing configured?
[Tue Dec 24 11:39:32.611925 2019] [reqtimeout:info] [pid 23620] [client 10.10.0.1:17338] AH01382: Request header read timeout
我的 apache2 位于 pfSense 后面,并通过 7580 NAT 到这台特定的机器。
我的端口.conf:
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen *:7580
<IfModule ssl_module>
Listen 7580
</IfModule>
<IfModule mod_gnutls.c>
Listen 7580
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
access.log文件是空的。
other_vhosts_access.log 如下所示:
cloud.example.com:443 10.10.0.1 - - [24/Dec/2019:11:39:12 -0600] "GET /index.php HTTP/1.1" 500 3780 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36"
cloud.example.com:443 10.10.0.1 - - [24/Dec/2019:11:39:32 -0600] "-" 408 3274 "-" "-"
因此看起来即使我将 :7580 附加到 URL,它仍然在尝试访问 443 上的服务器。
您在我的配置中看到了什么吗?或者您认为我可以尝试什么?我非常困惑。
谢谢。
答案1
这个故事的寓意是:检查你的 MySQL 连接。显然我输入了 MySQL 密码,导致无法连接。