Forum Archive - Change from Apache to Nginx

Change from Apache to Nginx
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
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 ErrorJan 11, 2019 2:15 pmReplies: 1Post by: mightyfineprint
Change language automaticallyNov 26, 2018 9:29 pmReplies: 3Post by: Antilb
Change the color of the Language Switcher can i do that?Sep 18, 2018 1:58 pmReplies: 3Post by: rohitlopes
Change Link ColorSep 11, 2018 7:10 pmReplies: 3Post by: onechance
Change ip adressFeb 8, 2018 12:58 pmReplies: 1Post by: serdmitriy

Try GTranslate with a free 15 day trial