nativeInstallerwordpress-pro

Enable CORS

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

Follow these steps:

  • Edit the NGINX configuration file at installdir/apps/wordpress/conf/nginx-app.conf file and add the following lines to it:

    location ~* .(eot|otf|svg|ttf|woff|woff2)$ {
      add_header Access-Control-Allow-Origin *;
    }
    
  • Edit the installdir/nginx/conf/mime.types file and add the following lines to it within the [type] block:

    application/vnd.ms-fontobject eot;
    application/x-font-opentype otf;
    image/svg+xml svg;
    application/x-font-ttf ttf;
    application/font-woff woff;
    application/font-woff2 woff2;
    
  • Restart the NGINX server:

    $ sudo installdir/ctlscript.sh restart nginx
    
Last modification March 19, 2019