Skip to main content

server 500 error - 'Internal server error' on Nginx

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

Response

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

 

Setting DataStore with CKAN on Nginx

Following the instructions on CKAN DataStore with a little information.

 

Enable the plugin

In your CKAN config file (/etc/ckan/default/ckan.ini), update the datastore plugin

ckan.plugins = datastore

 

CRIT Supervisor is running as root... Privileges were not dropped because no user is specified

Supervisor running as root error when running the command

sudo service supervisor status

Response error

892 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.

Check the supervisord.conf file in the directory

Listening to services running that use port 80

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

Response

Ubuntu Jetty Solr running

The following the CKAN source install docs from start to finish including solr.  At this point, the site should load but you'll get solr errors.  Make the following solr updates:

Go the the directory

/etc/systemd/system

Check if there is a directory jetty9.service.d.  In my situation there was, but if it doesn't exist

Installing CKAN from source on Ubuntu 20.04

If you're planning to create extensions, generating CKAN from source is the preferred option.  However, even if you have installed from package, you can make adjustments to creating extensions.

 

Set up your server

Begin by cleaning up your server environment.  Do this by updating Ubuntu’s package index:

Create a Ubuntu backup shell script

An approach to generating a backup server is using a shell script.  A script can define directories to backup, and pass those directories as arguments to the tar utility, which creates an archive file. The archive file can then be moved or copied to another location.

 

How to set up password authentication with Nginx on Ubuntu 20.04

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

Response:

Subscribe to 20.04