I have this config -
The location block to set expires headers breaks the alias location.
Is there a way to get them to both work?
Everything that matches should issue an expires header.
However, I want to alias /icommon to another path. According to the
wiki this is the right syntax, but once again I am stuck with location
confusion ![]()
server {
listen 80;
server_name test.com;
index index.php;
root /home/test/web/test.com/rfdev;
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|html)$ {
expires max;
}
location /icommon/ {
alias
/home/test/web/test.com/rfdev/core/common/;
}
}
I have to comment out the expires block for now, or it wonât work. Is
this a bug? How else can I do an alias? I tried setting ârootâ for
that location, and it âsortaâ works, the problem is is it tries to
append the location, which doesnât work for me, unless I rename the
file paths and set the ârootâ to the directory above itâŚ
location /icommon/ {
root /home/test/web/test.com/rfdev/core/common/;
}
Maps to this then /home/test/web/test.com/rfdev/core/common/icommon/;
Would have to set root to /home/test/web/test.com/rfdev/core/, and
then rename âicommonâ to âcommonâ on the filesystemâŚ
I think there might be a slight bug in how âaliasâ handling is done?
Shouldnât it basically be like redefining a ârootâ ?
Thanks