'How to deploy just html, css and javascript files to apache tomcat (centos) and configure inside etc/httpd folder?

I have created a project in which there are index.html, CSS and JavaScript files. So I have put it inside my /home/tomcat/webapps/player folder. I have a domain name and SSL certificates for that too. Now, I want to configure virtualhost for port 80 and 443. Here I am bit confused that how to write configuration for that?

I have tried to write my configuration as below:

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /home/tomcat/webapps/player
    <Proxy /home/tomcat/webapps/player>
        Options None
        Order deny,allow
        Allow from all
    </proxy>
    ProxyRequests on
    ProxyPassReverseCookieDomain localhost example.com www.example.com
    
    Redirect / https://www.example.com/
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://www.example.com$1 [R,L]
    
    ErrorLog /var/log/httpd/player-error_log
    CustomLog /var/log/httpd/player-access_log common
</VirtualHost>

<VirtualHost *:443>
    ServerName example.com
    ServerAlias www.example.com
    
    SSLEngine on
    SSLCertificateFile /home/cert/projectfolder/ssl.cer
    SSLCertificateKeyFile /home/cert/projectfolder/private.key
    SSLCertificateChainFile /home/cert/projectfolder/caclient.cer
    DocumentRoot /home/tomcat/webapps/player
    
    ProxyRequests on
    ProxyPassReverseCookieDomain  eldtapp.com www.example.com
    RequestHeader set X-Forwarded-Proto "https"
    RequestHeader set X-Forwarded-Port "443"
</VirtualHost>

Please help me suggesting some solutions.



Sources

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

Source: Stack Overflow

Solution Source