'You don't have permission to access mp3 file on this server

I have Apache (CentOS) server. If I place some audio file in my directory and run them in my browser then getting 403 forbidden error. The whole scenario is:

I have created a player in Adobe Captivate and published that into HTML and integrated into my Spring Boot application. It is working fine on my local machine but after pushing it to server. I am getting Forbidden Error when my player gets loaded and unable to load audio files (mp3) format.

Below is my configuration file:

    <VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/html/player
    <Directory /var/www/html/player>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
  
    Redirect / https://www.example.com
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://www.example.com$1 [R,L]
    
    ErrorLog /var/log/httpd/eldtplayer-error-log
    CustomLog /var/log/httpd/eldtplayer-acces-log common
</VirtualHost>

<VirtualHost *:443>
    ServerName example.com
    ServerAlias www.example.com
    
    SSLEngine on
    SSLCertificateFile /home/cert/ecdl/ssl.cer
    SSLCertificateKeyFile /home/cert/ecdl/private.key
    SSLCertificateChainFile /home/cert/ecdl/caclient.cer

    DocumentRoot /var/www/html/player
    <Directory /var/www/html/player>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    RequestHeader set X-Forwarded-Proto "https"
</VirtualHost>

screenshot of the issue:

Screenshot to display 403 error

Screenshot to display 403 error



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source