Drupal

Drupal 8 Ispconfig Nginx directives

 location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
                deny all;
       }
       location / {
                try_files $uri $uri/ /index.php?$args;
       }
       location ~*  \.(jpg|jpeg|png|gif|css|js|ico)$ {
                expires max;
                log_not_found off;
       }
Read More!

Ispconfig Jailkit php, composer, mysql, drush, composer, node, ruby, compass

Install components

Install Composer

sudo apt-get install composer

Install Node.js and NPM

sudo apt install nodejs

Install Ruby and Gem

sudo apt install ruby-full

Install Compass

sudo gem install compass

After you have installed the required libraries we need to update the commands in the jailkit init file.

sudo nano /etc/jailkit/jk_init.ini

[php]
comment = the php interpreter and libraries
executables = /usr/bin/php,/usr/bin/php5.6,/usr/bin/php7.0,/usr/bin/php7.1
directories = /usr/lib/php, /usr/share/php, /usr/share/php5, /etc/php, /usr/share/php-geshi, /usr/share/zoneinfo, /etc/snmp, /usr/share/snmp
includesections = env

[env]
comment = environment variables
executables = /usr/bin/env

[mysql-client]
comment = mysql client
executables = /usr/bin/mysql, /usr/bin/mysqldump
paths = /usr/lib/libmysqlclient.so

[drush]
comment = drush (drupal command line)
executables = /usr/local/bin/drush
includesections = php, mysql-client, uidbasics, netbasics
directories = /etc/ssl/certs, /usr/share/ca-certificates

[composer]
comment = composer
executables = /usr/local/bin/composer
includesections = php, uidbasics, netbasics

[node]
comment = NodeJS
executables = /usr/bin/npm, /usr/bin/node, /usr/bin/nodejs
directories = /usr/lib/node_modules

[ruby]
comment = Ruby
executable = /usr/bin/ruby, /usr/bin/gem, /usr/bin/gem2.3
directories = /usr/lib/ruby, /usr/lib/x86_64-linux-gnu/ruby, /var/lib/gems, /usr/share/rubygems-integration

[compass]
comment = Compass
executables = /usr/bin/compass
includesections = ruby
directories = /usr/share/compass

If user and site is created already

jk_init -c /etc/jailkit/jk_init.ini -f -k -j /var/www/clients/client1/web1 php node mysql-client drush 

Go to system -> server config with ( php git composer node ruby compass )

Read More!

How to delete all unpublished commands on Drupal using sql

DELETE c, rcb, dcb
FROM
    comment AS c
JOIN field_revision_comment_body AS rcb ON (c.cid = rcb.entity_id)
JOIN field_data_comment_body AS dcb ON (rcb.entity_id = dcb.entity_id)
WHERE
    c. STATUS = 0

or

DELETE FROM field_data_comment_body USING field_data_comment_body JOIN comment ON comment.cid=field_data_comment_body.entity_id AND comment.status=0
DELETE FROM field_revision_comment_body USING field_revision_comment_body JOIN comment ON comment.cid=field_revision_comment_body.entity_id AND comment.status=0
DELETE FROM comment WHERE status=0
Read More!

Need Help With Code?