Adding an SSL wildcard certificate to an Ubuntu server involves several steps. A wildcard certificate can secure subdomains of a domain with a single certificate. Here's a general outline of the process:
I'll be using an existing wildcard certificate.
sudo apt update && sudo apt upgrade -y
Focusing on the ckan.ini file (/etc/ckan/default/ckan.ini). When I run the commands to recreate the database tables for CKAN:
cd /usr/lib/ckan/default/src/ckan ckan -c /etc/ckan/default/ckan.ini db init
The response I'm getting is:
Finding the issue with a server 500 error
The Nginx error logs are showing too much detail.
Nginx logs and test
There are no errors in the nginx log and sudo nginx -t looks fine
sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Listen in on the ports being used on your server. To do so, run the command
netstat -a | grep tcp
If netstat is not install, then you'll be prompted to run the install script
sudo apt install net-tools
Error with Nginx
When running an Nginx test, the following response was being presented:
Goal: Restrict content access through username and password entry on an Nginx server.
1: Apache Utilities Package
First, update your server’s package index:
sudo apt update
Check if the utilities package exists in your environment by executing the command
dpkg --get-selections | grep apache
Dangerous word... I'm assuming that Docker is installed. Don't know how to check? Using Terminal (I prefer iTerm2), run the following command
docker -D info
Go to your project directory, and create a docker folder and a “docker-compose.yml” file:
Configure Nginx SSL + force HTTP to redirect to https and force non-www to www using Nginx configuration file only
Forcing https and www or non-www is a process that I was a custom to through .htaccess. In fact I had become very strong at managing and working my .htaccess files. However, what I had become strong in one area, I was oblivious to using other methods. My bad.
Well that was until I had to change my way. Working on an Nginx server, .htaccess was not in play. Instead, I needed to configure the /etc/nginx/sites-available directory.
Working in Drupal 9.x, I was loading images via the Media module. Below 1 mb no issue. Any thing over - nothing. Nothing as in no response when loading.
An interesting situation, as I had already changed the php.ini file where the following updates occured:
; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize upload_max_filesize = 2M
Had changed to
upload_max_filesize = 10M
Also the post max size