Apache Httpd

Apache httpd

ComeOnOliver Updated 61 repo stars

File contents

Apache httpd

Virtual Hosts

<VirtualHost *:80>
    ServerName myapp.com
    DocumentRoot /var/www/myapp/public
    <Directory /var/www/myapp/public>
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

SSL: sudo certbot --apache -d myapp.com

Reverse Proxy

ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/

.htaccess (SPA fallback)

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [L]

Modules: sudo a2enmod rewrite ssl proxy headers expires deflate

Security: ServerTokens Prod, X-Frame-Options, CSP headers

ComeOnOliver/skillshub/tree/main/skills/skillshub-team/catalog-batch5/apache-httpd commit 6e5609c3b3

Frequently asked questions

npx skillmds@latest add comeonoliver/apache-httpd