Skip to main content

Posts

Showing posts from July, 2021

How to configure Simple OAuth Module with drupal 8

 There are many steps for setup simple_oauth module in drupal 8 which are following : Step 1: - Install simple_oauth module by using the following commands : a. composer require 'drupal/simple_oauth:^5.0' b. drush en simple_oauth Note- You can use any other installation method if your machine does not configure with composer and drush. Step 2:- Generate a pair of keys to encrypt the tokens. And store them outside of your document root for security reasons. You can use following commands for that : a. openssl genrsa -out private.key 2048 b. openssl rsa -in private.key -pubout > public.key c. Save the path to your keys in: /admin/config/people/simple_oauth. d. Go to REST UI and enable the oauth2 authentication in your resource. Step 3:- Create a Client Application by going to: /admin/config/services/consumer/add. Step 4:- Create a token with your credentials by making a POST request to /oauth/token. Step 5:- (Not shown) Permissions are set to only allow to vi...

How to configure memcache with drupal 8 on ubuntu for reduce page load?

Memcache is an in-memory (RAM). It store data in Key-Value Format. Memcached server automatically stores all the content (data) in allocated RAM on the server. After configure memcache, it increase Drupal Site performance by moving standard caches out of the database. Drupal does not come with memcache by default if we want to install it then we have to install it on server. There are many steps that how to install memcache on the server and how to configure it with drupal 8 for reducing the load on the database with every page request. Step1 :- Open terminal of your machine and run following commands :- a. sudo apt-get update b. sudo apt install memcached c. sudo apt install php-memcached Step2 :- Check that Memcache daemon is working by using the following command : a. "ps aus | grep memcached" Step3 :- Also, check Memcache extension is configured in PHP. For that you have create a file phpinfo.php then write below code. <?php phpinfo(); ?> or sudo vi /var/www/html...