Nginx CORS error

Request header field Access-Control-Allow-Headers is not allowed by Access-Control-Allow-Headers add these lines in server part of the config file    add_header ‘Access-Control-Allow-Origin’ * always;         add_header ‘Access-Control-Allow-Headers’ * ; xmlhttprequest-ajax-set-content-type  location ~* .(?:ico|css|js|gif|jpe?g|png|woff|application/json)$ {             try_files $uri @blogcssjs;             expires 30d;   …

Nginx CORS error Read More »

404 nginx error

Change the line in the location block to: try_files $uri $uri/ /index.php?q=$uri&$args; and reload nginx sudo systemctl reload nginx All should be well 🙂

Nginx and PHP-FPM Configuration and Optimizing

Nginx Configuration and Optimizing Tips and Tricks Nginx Tip 1. – Organize Nginx Configuration Files Normally Nginx configuration files are located under /etc/nginx path.One good way to organize configuration files is use Debian/Ubuntu Apache style setup: ## Main configuration file ##/etc/nginx/nginx.conf## Virtualhost configuration files on ##/etc/nginx/sites-available//etc/nginx/sites-enabled/## Other config files on (if needed) ##/etc/nginx/conf.d/ Virtualhost files have 2 …

Nginx and PHP-FPM Configuration and Optimizing Read More »