Change from Apache to Nginx

Popular automatic website translation tool

Change from Apache to Nginx

Postby claesbas » Tue Oct 06, 2015 1:26 am

I got this to add to .htaccess from you guys once to fix my font problem.

Code: Select all
<FilesMatch "\.(ttf|ttc|otf|eot|woff)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"

<FilesMatch "\.(js)$">
Header set Access-Control-Allow-Origin "*"

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?
Posts: 22
Joined: Tue Jan 21, 2014 2:57 pm

Re: Change from Apache to Nginx

Postby Edvard » Tue Oct 06, 2015 3:49 am

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


Edvard Ananyan - GTranslate Team

Please leave your feedback on your CMS plugin directory. It is very important for us!
Google Translate Joomla
Google Translate WordPress
Google Translate Drupal
Site Admin
Posts: 4403
Joined: Mon Jun 28, 2010 1:54 pm
Location: Yerevan, Armenia

  • Related Topics
    Last post

Who is online

Users browsing this forum: No registered users and 2 guests