## Dovecot
File : /etc/dovecot/dovecot.conf
Add :
ssl_protocols = !SSLv2 !SSLv3
and service dovecot restart
| <?php | |
| // Views page and feeds list | |
| $views = array(); | |
| foreach (views_get_enabled_views() as $view_name => $view) { | |
| // Filter views having no display | |
| if (count($view->display) > 1 && (strpos($view_name, 'admin') === FALSE)) { | |
| $views[$view_name] = array( | |
| '#theme' => 'item_list', | |
| '#title' => $view->human_name, |
| -----BEGIN PGP MESSAGE----- | |
| Version: GnuPG v1.4.11 (GNU/Linux) | |
| owFtkntQVFUcx3cXeYXITjIS1RKtOAyy7Jxz35dJUQJshMI/KENG1nPvPXe5PHbX | |
| fQWDmNiDoZympmAtQs0clCGYcCSKVwmFSAl/6EQqZNSMSuIENGBGZPcy9HCmc/45 | |
| 5/w+53t+39/vvBkZpAvTJzif1X+BPjbpv54SdHnZfrbSLDilCnNqpVksVbDDq60c | |
| qAybU80luEJAHmxVnPEOp4StxZ74FcZi9mO3R3E6VApYWSthrrJouHZZVhx27Ha5 | |
| FU3LjHiWFimBRYCANEURQCIZgHmCoBiZpgEUAQMFACVVssjp8d73qnlZ06ZI6qnK | |
| Z2n8kyqfDmCGGvMtBzCLOZICPOAEhmQICEVEQIkggURzJAGABnqwe8WS06VoqZZh | |
| d0kptrmdzmW/olfRopCCFEFCmmfVZJCnSOVpHgIOA4x4JDCswEKelCiJI0VRYDCQ |
| #!/bin/bash | |
| # Download drush if needed | |
| if [ ! -d drush ] | |
| then | |
| # Download | |
| wget https://github.com/drush-ops/drush/archive/6.4.0.tar.gz | |
| # Unpack | |
| tar xvzf 6.4.0.tar.gz | |
| # Rename |
| // Generate a random DOM. | |
| // http://twitter.com/cowboy/status/65845594400362496 | |
| (function(s,n){while(n--){s.push($('<div/>').appendTo(s[~~(Math.random()*(s.length-1))]))}})(['body'],10000); | |
| // Cycle bg, starting at a random color. | |
| (function(time){ | |
| var start = Math.floor(Math.random() * time); | |
| var dec = "animation: bgcolors -" + start + "s " + time + "s linear infinite;"; | |
| var html = "<style>html{-webkit-" + dec + dec + "}</style>"; | |
| $("head").append(html); |
# SSL with a Gandi certificate
Generer la csr (http://wiki.gandi.net/fr/ssl/csr)
openssl req -nodes -newkey rsa:2048 -keyout monserveur_encrypted.key -out serveur.csr
( n'oubliez pas d'entrer une passphrase pour securiser votre clé privée. )
Gandi renvoye 2 fichiers:
# Yunohost Nginx fine tuning
Experimental Nginx config that will give you an A+ grade on ssllabs.com.
Most of this config could be merged into yunohost default, except the dhparam.pem file creation, because it takes too much time.
openssl dhparam -out /etc/ssl/private/dh2048.pem -outform PEM -2 2048
| <?php | |
| /** | |
| * Implements hook_entity_info_alter(). | |
| */ | |
| function MYMODULE_entity_info_alter(&$entity_info) { | |
| $entity_info['node']['view modes']['another_teaser'] = array( | |
| 'label' => t('Another teaser'), | |
| 'custom settings' => TRUE, | |
| ); |
| <?php | |
| function THEME_html_head_alter(&$head_elements) { | |
| $head_elements['system_meta_generator']['#attributes']['content'] = "Drupal 8 (http://drupal.org)"; | |
| } |
| <?php | |
| /** | |
| * Implements of hook_query_node_access_alter(). | |
| */ | |
| function MYMODULE_query_node_access_alter(QueryAlterableInterface $query) { | |
| $search = FALSE; | |
| $node = FALSE; | |
| foreach ($query->getTables() as $alias => $table) { |