Change from Apache to Nginx
Oct 5, 2015 9:26 pm by claesbas
Oct 5, 2015 9:26 pm by claesbas
I got this to add to .htaccess from you guys once to fix my font problem.
<FilesMatch "\.(ttf|ttc|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
<FilesMatch "\.(js)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
No I moved to Nginx server. Here .htaccess is not working as you probably know. What can I do on a Nginx server to get same function as above?
Re: Change from Apache to Nginx
Oct 5, 2015 11:49 pm by Edvard
Oct 5, 2015 11:49 pm by Edvard
It should be like this:
location ~* \.(ttf|ttc|otf|eot|woff|js)$ {
add_header Access-Control-Allow-Origin *;
}
make sure that your nginx is compiled with ngx_http_headers_module
Thanks!
SIMILAR TOPICS
Nginx 502 Error | Jan 11, 2019 2:15 pm | Replies: 1 | Post by: mightyfineprint |
Change language automatically | Nov 26, 2018 9:29 pm | Replies: 3 | Post by: Antilb |
Change the color of the Language Switcher can i do that? | Sep 18, 2018 1:58 pm | Replies: 3 | Post by: rohitlopes |
Change Link Color | Sep 11, 2018 7:10 pm | Replies: 3 | Post by: onechance |
Change ip adress | Feb 8, 2018 12:58 pm | Replies: 1 | Post by: serdmitriy |