Basic Nginx configuration for Drupal
The following script is a working Nginx configuration for Drupal with Boost and clean URL for 6, 7 and 8 support:
The following script is a working Nginx configuration for Drupal with Boost and clean URL for 6, 7 and 8 support:
As of this writing, the latest Laravel Valet requires PHP 7.2. What if you still have legacy projects or Drupal 6 modules you maintain that can't run under PHP 7.2? It would be nice if Laravel Valet has option to run multiple PHP versions but there isn't one. Laravel Valet uses nginx + php-fpm and we can tap to nginx and php-fpm's configurations to make possible to run our legacy projects in PHP 5.6. This will make our nginx running both PHP 7.2 and PHP 5.6.
The Homebrew service control in macOS does not display if there is/are error(s) in your nginx configuration. For example if you mistakenly duplicate the declaration of "client_max_body_size" directive Homebrew service control won't give any error details or even tell you that there is error in your nginx configuration when you restarted the nginx service:
A client asked me to work on one particular page of his existing Drupal site to have its own different separate domain. This is one good solution if you have special web page that you want to quickly improve ranking on search engines.
Lets say, the http://www.webfoobar.com/node/88 is the page that we want it to have its own domain "test7.webfoobar.com". The following steps will accomplish this task:
If a website is trying to access web static files from different URL domain, broken web assets and the following error will occur:
Access to Font at 'https://www.webfoobar.com/sites/webfoobar.com/themes/custom/mybootstrap/fonts/sniper.woff?1887860575' from origin 'https://test7.webfoobar.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://test7.webfoobar.com' is therefore not allowed access.
We know that "Origin Pull" Content Delivery Networks only require us to change the static file URLs (CSS, JS, images, etc.) so that these static files will be downloaded from a CDN instead of our web server.
The Let's Encrypt is a certificate authority that offers free and automated SSL/TLS certificates for your website(s). It issues certificates trusted by most browsers. In this article will show how to setup and automate the renewal of Let's Encrypt SSL/TLS certificates with Nginx.
The Nginx+PHP FPM is the ideal web-server setup as this is more faster web service. This article should be a continuation of this article (just skip the "Configure Apache" section and if you are not using Virtualmin, skip the "Configure Virtualmin" section.).
The following procedures are tested on Linode server running Centos 7 64-bit Linux distribution.
This solution should apply to Drupal sites that uses Nginx as web server with PHP FPM and the Nginx configuration is based on perusio's Nginx configuration for running Drupal.
This article will guide on setting up Solr Admin web interface in Nginx. If you haven't installed Solr in your system, please check this article Step by step guide to setup Apache Solr 5.x in CentOS 7 for Drupal 7 Panopoly distro using Search API. Please follow this guide if you haven't setup your Nginx yet.
Create a domain for Solr, in this guide lets use solr.mywebsite.com. Go to DNS manager and add "solr" as A record for mywebsite.com