如何解决Apache中MP3文件的禁止错误?
我正在春季靴子上进行项目构建。因此,现在我正在尝试访问Apache Weberver Path/home/tomcat/webapps/example/web-inf/classes/static/public/public/public/example-content/chapter/chapter-chapter-1/audio/1.mp3上的mp3文件。但是我获得403状态,说禁止错误。我已经为端口443虚拟主机配置了我的项目,并授予文件夹和文件的所有权限。
以下是虚拟主机配置:
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
SSLEngine on
SSLCertificateFile /home/cert/example/ssl.cer
SSLCertificateKeyFile /home/cert/example/private.key
SSLCertificateChainFile /home/cert/example/caclient.cer
DocumentRoot /home/tomcat/webapps/example
<Directory /home/tomcat/webapps/example/WEB-INF/classes/static/public/example-content/Chapter-1/Audio>
Options -Indexes +FollowSymLinks +MultiViews
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ProxyRequests on
ProxyPass / http://localhost:9111/example/
ProxyPassReverse / http://localhost:9111/example/
ProxyPassReverseCookiePath /example /
ProxyPassReverseCookieDomain example.com www.example.com
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
</VirtualHost>
但是每次仍然会遇到相同的错误。我不知道我在哪里做错。如果您有任何建议或解决方案,请给我。
I am working on a project build on spring boot. So now I am trying to access mp3 files deployed on apache webserver path /home/tomcat/webapps/example/WEB-INF/classes/static/public/example-content/Chapter-1/Audio/1.mp3. But I am getting 403 status saying forbidden error. I have configured my project for port 443 virtual host and given all permission to folders and files also.
Below is the virtual host configuration:
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
SSLEngine on
SSLCertificateFile /home/cert/example/ssl.cer
SSLCertificateKeyFile /home/cert/example/private.key
SSLCertificateChainFile /home/cert/example/caclient.cer
DocumentRoot /home/tomcat/webapps/example
<Directory /home/tomcat/webapps/example/WEB-INF/classes/static/public/example-content/Chapter-1/Audio>
Options -Indexes +FollowSymLinks +MultiViews
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ProxyRequests on
ProxyPass / http://localhost:9111/example/
ProxyPassReverse / http://localhost:9111/example/
ProxyPassReverseCookiePath /example /
ProxyPassReverseCookieDomain example.com www.example.com
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"
</VirtualHost>
But still getting same error each time. I don't know where I am doing mistake. If you have any suggestions or solutions, please provide me.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论