If you want to use Lightbend Config configuration files in your Scala or Java application, here’s a quick example of how to configure and use Lightbend Config in your application. In this case I’m specifically using Scala and SBT.
java -Dconfig.file=my_app.conf [the rest of your app parameters] -------------------------
In my case I read the Lightbend Config file like this in my Scala application:
Table of Contents
- New Linode Server
- Update Everything
- Ubuntu Firewall
- Add a New User
- Disabling Root Login (sshd_config)
- Limit Login Attempts (sshd_config)
- Install Nginx and MySQL
- Adjust Firewall
- Nginx Configuration
- Installing Java on Ubuntu
- NOT what I used: Let’s Encrypt on Ubuntu 16.04
- (1) Create a cert (openssl)
- (2) Create a strong Diffie-Hellman group
- (3) Configure Nginx to Use SSL
- Adjust the Nginx Configuration to Use SSL
- (Alternative Configuration) Allow Both HTTP and HTTPS Traffic
- Adjust the Firewall
- Enable the Changes in Nginx
- Test in Browser
- Nginx "default_server"
- Can change to a permanent redirect (301)
- More Security: Preventing Information Disclosure
- More Security: Fail2Ban
- Restricting Access by IP Address
- See also
Without any introduction or discussion, here are the notes I made while learning how to get HTTPS working with Nginx. These are just for me, but if something helps you, cool.
UPDATE: These days you should put your server configurations in files in the /etc/nginx/sites-enabled directory.
As a short note, if you need to configure Nginx to serve multiple static websites out of one nginx.conf file, I have been using this approach, and it seems to work well:
In case you need a sample .bash_profile startup file for your MacOS or other Unix/Linux system, I thought I’d share my most recent version here.
If you're not familiar with a .bash_profile file, this is a startup file that is read whenever you open a new Terminal window. It's a special configuration file, and it needs to be placed in your home directory. For instance, on my MacBook Pro, this file is located as /Users/al/.bash_profile.