Nginx

How To Update to PHP 7.4 Ubuntu 16.04 Drupal 7 Nginx

| 124 views

I was facing problems with some Drupal modules not being supported, before upgrading to PHP 7.4 version.   As I had running Ubuntu 16.04 server with Nginx and PHP 7.0 FPM on in I felt a bit afraid performing a live update and decided to make a new backup for all settings.  Here I found some good advice: How To Install PHP 7.4 on Ubuntu 20.04/18.04/16.04 and also for Drupal specific things took my own advice from here: How to Install Drupal with Nginx, PHP-FPM 7.4, MySQL, phpMyAdmin on Ubuntu…


How To HTTPS Secure Drupal 8 Running Nginx with Let's Encrypt on Ubuntu 18.04

| 10 views

Let's Encrypt have done some very good job, providing SSL certificates that everyone can use absolutely for free. Encrypted HTTPS websites should be default in 2020. I have been implementing HTTPS secure websites for years. Until now I mostly worked with Drupal 7 websites and for securing them I have been using this guide, back from 2016 - Linode: How To Secure Nginx with Let's Encrypt on Ubuntu 12.04 Now, in 2020, working on a new, Drupal 8 powered, website after then initial web development…


How To Enable Google Adsense ads.txt file for Drupal on Nginx

| 16 views

Around early September 2019, in my Google AdSense dashboard, I noticed a warning informing me to create a separate ads.txt file.  I followed the on-screen instruction and did what was asked. After two months (at the start of November) I noticed my earnings from Google AdSense have dipped more than half and the warning was still there.  Earnings at risk - You need to fix some ads.txt file issues to avoid severe impact to your revenue. Authorized Digital Sellers, or ads.txt is an IAB…


How to block visitors from country NGINX + GeoIP Module

| 23 views

There are a couple of reasons why website administrators consider blocking visitors from particular countries or regions accessing websites, the most common reason probably is hacking/hacking attempts.  One really nasty way how website hackers act are, they inject malicious code into vulnerable websites and redirect legit audience to shady affiliate or black SEO websites. This method is also known as cloaking.  By investigating NGINX access.log file we can determine 404 pages (hacking…


How To Fix "gzip is failing for js files" Nginx

| 6 views

From Drupal Reports status page I noticed gzip is failing for js files error The web servers configuration will need to be adjusted. In most cases make sure that the webroots .htaccess file still contains this section "Rules to correctly serve gzip compressed CSS and JS files". Certain default web server configurations (nginx) do not gzip HTTP/1.0 requests. If you are using cloudfront you will have to add metadata to the .gz files. There are some other options if using cloudfront. For Nginx…


How To Redirect in Nginx all Domain Name Versions to https://www

| 2 views

As you might already know search engines (Google) sees www.domain.com and domain.com as two separate domain names. If you are not using 301 redirects (www to non-www or vice verse)you might get penalized for duplicate content.  In Ngnix, there is a simple solution how to make such redirect happen, see: Ngnix Redirect To WWW Now, things get a bit complicated when https versions are involved. See: Linode: How To Secure Nginx with Let's Encrypt on Ubuntu 12.04 Once your website has https…


How To Fix: Error: Call to undefined function curl_init()

| 1 views

After upgrading from Ubuntu 12 to Ubuntu 16 I discovered an error for Drupal website sending e-mails using Mailsystem + Postmark here is the error code: Error: Call to undefined function curl_init() in Mail_Postmark->send() (line 322 of /srv/www/reinisfischer.com/public_html/sites/all/libraries/postmark-php/Postmark.php). Luckily there is an easy solution, installing missing curl: sudo apt-get install php-curl Hope, that helps!


Postfix Send Only SMPT Mail for Drupal 8 on Ubuntu 16.04, Nginx

| 2 views

If you have recently installed a fresh Drupal 8 site on Ubuntu 16.04 with Nginx running on it and you are getting Unable to send e-mail. Contact the site administrator if the problem persists notice after submitting contact form, you are missing an important element for your site to functions properly. You could be missing important information about available updates, as Drupal uses cron to sends notification e-mails once updates are available. The following written applies not only to Drupal…


How To Password Protect Your site with Nginx on Ubuntu 14.04

| 1 views

I was working on a new customers website, and I was looking for ways to showcase current development stage to the client, meanwhile hiding contents from others. Sounds familiar? In this server series guide I will provide info how to set up basic HTTP authentication with Nginx on Ubuntu 14.04. Most details for this article are taken from Digital Ocean's guide: How To Set Up Basic HTTP Authentication With Nginx on Ubuntu 14.04 with few minor adjustments. As I'm serving more than just one domain…


How to Upgrade from Ubuntu 12.04 to 14.04 LTS

| 5 views

In this article I will provide simple instructions on how to upgrade Ubuntu 12.04 to 14.04.  In fact I didn't wanted to push for a server upgrade for a while, but decided to do it now, and not to wait when things will break completely. In fact I was working on a Drupal 8 site development and wanted to have it on more recent version of server, and so I opted to upgrade whole server. Following tutorial is inspired from How to Upgrade to Ubuntu 14.04 LTS Backups I highly suggest you to take a…