Angular Deployment: Difference between revisions
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
I have used apache for deployment which means this page and other conf need to be excluded. I used the following config | I have used apache for deployment which means this page and other conf need to be excluded. I used the following config | ||
<syntaxhighlight | <syntaxhighlight lang="apacheconf"> | ||
<VirtualHost *:443> | <VirtualHost *:443> | ||
Line 54: | Line 54: | ||
To allow my confs to work I added the datagroup entries for each | To allow my confs to work I added the datagroup entries for each | ||
<syntaxhighlight | <syntaxhighlight lang="json"> | ||
{ | { |
Latest revision as of 02:12, 8 March 2021
My Deployment
I have used apache for deployment which means this page and other conf need to be excluded. I used the following config
<VirtualHost *:443>
ServerName www.test.com
DocumentRoot /mnt/RAIDARRAY/WEB/apps/www.test.com/bibbleWeb/
<Directory /mnt/RAIDARRAY/WEB/apps/www.test.com/bibbleWeb/>
Require all granted
</Directory>
# Rewrite rules
RewriteEngine On
# Do not redirect existing files and directories
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d [OR]
# Do not redirect confs
RewriteCond %{REQUEST_URI} ^/roundcube [OR]
RewriteCond %{REQUEST_URI} ^/mediawiki [OR]
RewriteCond %{REQUEST_URI} ^/phpldapadmin
# If the requested resource doesn't exist, use index.html
RewriteRule ^ - [L]
RewriteRule ^ /index.html
#
# SSL
#
SSLCertificateFile /etc/letsencrypt/live/www.test.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.test.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
#
# Rewrite debugging turn off
#
LogLevel alert rewrite:trace6
#
# Log definitions
#
ErrorLog ${APACHE_LOG_DIR}/www.test.com-error.log
CustomLog ${APACHE_LOG_DIR}/www.test.com-access.log combined
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
</VirtualHost>
My ngsw
To allow my confs to work I added the datagroup entries for each
{
"configVersion": 1,
"timestamp": 1607150185070,
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"updateMode": "prefetch",
"cacheQueryOptions": {
"ignoreVary": true
},
"urls": [
...
],
"patterns": []
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"cacheQueryOptions": {
"ignoreVary": true
},
"urls": [
"/assets/dev-config/ui-config.json",
...
],
"patterns": []
}
],
"dataGroups":
[
{
"name": "mediawiki",
"urls": ["!/mediawiki"],
"cacheConfig": {
"maxSize": 0,
"maxAge": "0u",
"strategy": "freshness"
},
{
"name": "roundcube",
"urls": ["!/roundcube"],
"cacheConfig": {
"maxSize": 0,
"maxAge": "0u",
"strategy": "freshness"
}
}
],
"hashTable": {
...
},
"navigationUrls": [
{
"positive": true,
"regex": "^\\/.*$"
},
{
"positive": false,
"regex": "^\\/(?:.+\\/)?[^/]*\\.[^/]*$"
},
{
"positive": false,
"regex": "^\\/(?:.+\\/)?[^/]*__[^/]*$"
},
{
"positive": false,
"regex": "^\\/(?:.+\\/)?[^/]*__[^/]*\\/.*$"
}
],
"navigationRequestStrategy": "performance"
}