I'm trying setup a location alias and am pulling my hair out. I'd like requests for example.com/(css|img|js) to alias to example.com/assets/(css|img|js), but for the life of me cannot get it working.
Here's what I have thus far:
location ~ ^/(css|js|img)/(.*)$ {
alias /srv/http/example.com/public_html/assets/$1/$2;
}
This seems to direct to the proper folder, but if says file not found when I try to access an actual file.
I'm missing something simple I feel, but not a clue what...
Here's what I have thus far:
location ~ ^/(css|js|img)/(.*)$ {
alias /srv/http/example.com/public_html/assets/$1/$2;
}
This seems to direct to the proper folder, but if says file not found when I try to access an actual file.
I'm missing something simple I feel, but not a clue what...