add example apache configs

This commit is contained in:
Trent Palmer 2021-01-08 14:56:40 -08:00
parent 877d49b560
commit 578f3408ac
2 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,34 @@
<VirtualHost *:80>
ServerName photo_app.example.com
ProxyPass "/.well-known" !
ProxyPass "/favicon.ico" !
ProxyPass "/css" !
ProxyPass "/js" !
ProxyPass "/" "http://127.0.0.1:8200/"
ProxyPassReverse "/" "http://127.0.0.1:8200/"
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
alias "/css" "/var/lib/<app_user>/css"
alias "/js" "/var/lib/<app_user>/js"
<Directory "/var/lib/<app_user>/css">
ExpiresActive on
ExpiresDefault "access plus 15 minutes"
Header set Cache-Control max-age=900
Options Indexes
Require all granted
Allow from all
</Directory>
<Directory "/var/lib/<app_user>/js">
ExpiresActive on
ExpiresDefault "access plus 15 minutes"
Header set Cache-Control max-age=900
Options Indexes
Require all granted
Allow from all
</Directory>
</VirtualHost>

16
photos.example.com.conf Normal file
View File

@ -0,0 +1,16 @@
<VirtualHost *:80>
ServerName photos.example.com
DocumentRoot /var/lib/<app_user>/photos
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/lib/<app_user>/photos">
ExpiresActive on
ExpiresDefault "access plus 1 year"
Header set Cache-Control max-age=31557600
Options Indexes
Require all granted
</Directory>
</VirtualHost>