Return (synth(403, “Cache-Tags header missing.”)) # Logic for the ban, using the Cache-Tags header. # Only allow BAN requests from IP addresses in the ‘purge’ ACL. # Only allow PURGE requests from IP addresses in the ‘purge’ ACL. Set -Forwarded-For = -Forwarded-For “, ” client.ip # Add an X-Forwarded-For header with the client IP address. # Here you need to put the IP address of your web server # Access control list for PURGE requests. Run the following command to reload systemd manager configuration: systemctl daemon-reloadīack up default.vcl: mv /etc/varnish/default.vcl /etc/varnish/Ĭreate a new default.vcl file (do not forget to change with the actual domain name): nano /etc/varnish/default.vcl Edit the ‘/etc/default/varnish’ Varnish configuration file: nano etc/default/varnishĪdd these lines at the end: DAEMON _OPTS="-a :80\Ĭreate a new varnish startup script for systemd: nano /etc/systemd/system/rvice ĮxecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,512m Install and Configure Varnish apt-get install varnishĬonfigure Varnish to listen on port 80. Mysql> GRANT ALL PRIVILEGES ON drupaldb.* TO FLUSH PRIVILEGES ĭo not forget to replace ‘y0uR-pa5sW0rd’ with a strong password. Mysql> CREATE USER IDENTIFIED BY 'y0uR-pa5sW0rd' Set Proper Ownership of Drupal FilesĪll files have to be readable by the web server, so set a proper ownership: chown Create MySQL Database and UserĬreate a new MySQL database and user: mysql -u root -p This will run the composer install process again remove everyhing from the “require-dev” section from the composer.lock file. To install the Drupal 8 website on a production server, you also need to run: composer install -no-dev Optionally, install Twig C extension: composer require twig/twig:~1.0 To install the Drupal 8 website on a development server, run: composer create-project drupal-composer/drupal-project:8.x-dev /var/www/html// -stability dev -no-interaction Install Composer: apt-get install composer mkdir -p /var/www/html// If you downloaded and extracted Drupal from source, you can skip this step and go to step 6. Mv drupal-*/* /var/Download and Install Drupal 8 using Composer – a PHP dependency manager 5.1 Download Drupal 8 from sourceĭownload the latest version of Drupal available at in the /opt/ directory on the server: cd /opt/ Download and Extract Drupal 8 Filesĭownload Drupal 8 and install if from source, or install Drupal 8 using Composer. Restart the Apache service for the changes to take effect: service apache2 restart 5. Enable Apache Rewrite ModuleĮnable Apache rewrite module if it is not already done so: a2enmod rewrite 4. Install the required PHP packages for Drupal 8: apt-get install php7.0 php7.0-cli php7.0-common php7.0-mbstring php7.0-curl php7.0-gd php7.0-json php7.0-mcrypt php7.0-mysql php7.0-xml 3. Make sure your server Debian 9 OS packages are fully up-to-date: apt-get updateĪpt-get upgrade 2. Let’s start with the installation procedure. This install guide assumes that Apache and MySQL/MariaDB are already installed and configured on your virtual server. Apache web server 2.2 or higher compiled with mod_rewrite module and AllowOverride set to ‘All’ (please note, the default setting for AllowOverride in Apache 2.3.9 and higher is ‘None’).MySQL – 5.5.3 (MariaDB 5.5.20, Percona 5.5.8) or higher with an InnoDB-compatible primary storage engine, PostgreSQL – 9.1.2 or higher, or QLite – 3.6.8 or higher.PHP 7.2 is not supported on the current release. PHP 5.5.9 or higher (preferably PHP 7.0), with GD library, JSON, cURL, mysqli, Mbstring, DOM, OpenSSL and XML PHP extensions enabled.At the time of writing this tutorial, the latest stable version of Drupal is 8.4.4, and it requires: It is a cross-platform application and supports all popular operating systems, but this tutorial was written for Debian 9 OS. Drupal is compatible with Varnish 3 and Varnish 4. Drupal is a popular open source web content management software written in PHP. We’ll show you how to speed up Drupal using Varnish on a Debian 9 VPS.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |