Web
Nagios Check HTTP notes
Example bash on argument 1. It checks if HTTPS is up and if the domain-name is on the site. Most sites have the domain name on the front page somewhere: /usr/local/nagios/libexec/check_http -H $1 --ssl --onredirect=follow --string "$1"
If log file you can run grep on the following keywords: grep -i -e "critical" -e "invalid" -e "warning" [LOGFILE.log]
Keywords: check_http
Tidy Up composer.json
Are you looking for an automatic tool to tidy up your composer.json? Look no further with normalize: https://localheinz.com/blog/2018/01/15/normalizing-composer.json/
PHP test if front page
$currentpage = $_SERVER['REQUEST_URI'];
if( $currentpage == "/" ) {
}
Recaptcha Above Send Message Button Webfrom Drupal 8
Go to Structure -> Webform -> Build -> Add element -> Capthca
Redirect And Rewrite Notes
Redirects with regular expressions
Basic intro to regex rewrite and redirect: https://www.searchenginepeople.com/blog/htaccess-redirect-rewrite-rules…
https://superuser.com/questions/155139/htaccess-301-redirect-with-regul…
- Read more about Redirect And Rewrite Notes
- Log in to post comments
Composer tips and tricks
Composer without root
Run this in ~/composer: curl -sS https://getcomposer.org/installer | php
Put this in .bashrc: alias composer="php ~/composer/composer.phar"
Install Drupal 8 With Composer In Custom Web Folder
composer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --no-interaction --no-install
Adjust web folder in composer.json file and then run "composer install".
Check available versions of a package
composer show package_name --available
- Read more about Composer tips and tricks
- Log in to post comments
Wordpress backup solutions
There are many backup solutions out there for wordpress sites.
For example these plugins:
UpdraftPlus can be connected with dropbox.
Jetpack
backWPup
Among others.
You might also want to build your own backup routine with cronjobs on the hosting server.
Remember to backup!
- Read more about Wordpress backup solutions
- Log in to post comments