试图寻找答案两天了。似乎没有什么适用。
net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK)
出现在Chrome控制台中。</html>
标签)stage.myproject.url
更改为stage.myproject.url/x
,并且错误不再存在,因此它已与主要URL紧密相连。根据Symfony Docs: Configuring a Web Server和网站的需求,Apache配置如下所示:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName stage.myproject.url
DocumentRoot /var/www/stage.myproject.url/public
<Directory /var/www/stage.myproject.url/public>
AllowOverride None
Require all granted
FallbackResource /index.php
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /etc/apache2/.htpasswd
Require valid-user
</Directory>
<FilesMatch \.php$>
# Apache 2.4.10+ can proxy to unix socket
SetHandler "proxy:unix:/var/run/php/php7.3-fpm.sock|fcgi://localhost/"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/stage.myproject.error.log
CustomLog ${APACHE_LOG_DIR}/stage.myproject.access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/stage.myproject.url/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/stage.myproject.url/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/stage.myproject.url/chain.pem
</VirtualHost>
</IfModule>
关于下一步该怎么做的任何提示?
修改:禁用
FallbackResource /index.php
该行消除了该错误,并同时中断了Symfony调试工具栏。
答案 0 :(得分:2)
Apache fixed in 2.4.25中似乎有一个错误。该服务器具有Ubuntu 16.04,该操作系统具有Apache 2.4.18
要解决此问题,我从PPA升级了Apache,如下所示:
apt-get install software-properties-common
add-apt-repository ppa:ondrej/apache2
apt-get update
答案 1 :(得分:0)
我通过在同一索引文件的DirectoryIndex
之前添加FallbackResource
来解决此问题:
<Directory /var/www/my-app/public>
AllowOverride None
Order Allow,Deny
Allow from All
DirectoryIndex /index.php
FallbackResource /index.php
</Directory>