This directives not working => Nginx ignores this cache control directive of 30d:

location ~* \.(ico|css|js|gif|jpeg|jpg|png|woff|ttf|otf|svg|woff2|eot)$ {
/var/app/current/app/dist/client/; #if i comment this out it, my css and js files are not found...
access_log off
log_not_found off
Pragma "public";
Cache-Control "public";

Reason: Pagespeed interfering with ‘Expires’ directive on static files

Because PageSpeed is loading the files directly from the filesystem, no custom headers will be set.

Example of Nginx directive of pagespeed module:

pagespeed LoadFromFile "" "/var/www/static/";

This directive tells PageSpeed to load all resources whose URLs start with  from the filesystem under /var/www/static/. For example, will be loaded from the file /var/www/static/images/foo.png. However, will still be fetched using HTTP. If you have resources that need to be served with custom headers, such as Cache-Control: private, you need to exclude them from LoadFromFile. For resources PageSpeed rewrites in-place it will set a 5-minute cache lifetime by default, which you can adjust by changing LoadFromFileCacheTtlMs.

Solution: Add this setting to the domain.conf:

pagespeed LoadFromFile "" "/var/www"
pagespeed LoadFromFileCacheTtlMs 31556926000;