How to serve a JavaScript build with Apache

To serve a JavaScript build with Apache is a very simple task and today I want to present you a very simple way of achieving that.

<VirtualHost *:80>

        RewriteEngine on
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

<IfModule mod_ssl.c>
<VirtualHost *:443>

        DocumentRoot /var/vhosts/www/client
        <Directory />
                DirectoryIndex index.html
                Options Indexes FollowSymLinks
                AllowOverride All
                Require all granted

        Include /etc/letsencrypt/options-ssl-apache.conf
        SSLCertificateFile /etc/letsencrypt/live/
        SSLCertificateKeyFile /etc/letsencrypt/live/

If you consider this helpful please give it a share. For any question or discussion please consider the comments section.

Leave a Reply

Your email address will not be published.

%d bloggers like this: