- elegant and efficient
- does one thing well
- can easily be read, and enhanced by a developer other than its original author
- meaningful names
- minimal dependencies
- has unit and acceptance tests
- clean code always looks like it was written by someone who cares
- nothing obvious that you can do to make it better
- no duplication
All you need is virtual private server (VPS). Use the following command to open up the port 1080 on your local machine as a SOCKS proxy so all your HTTP traffic can be specified to go through the SSH tunnel and out remote_ssh_server on the other end.
$ ssh -D 1080 -f -C -q -N -p 22 user@server-ip$ sudo openssl dhparam -out /etc/ssl/dhparam.pem 2048Point to a trusted certificate chain file. This must contain the intermediate & root certificates (in that order from top to bottom). See exemple_full_chain.pem
Get the root and intermediate certificates from where you buyed the certificates. For me it was:
Create file the following file /etc/nginx/site-available/redirect_http_to_https
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
Create symbolic link in the /etc/nginx/site-enabled/ folder
Use openssl to extract private key. After executing the following line. you will need to enter the password used when the pfx file was created.
openssl pkcs12 -in file_name.pfx -out certificate.cer -nodes
When converting a PFX file to PEM format, OpenSSL will put all the certificates and the private key into a single file. You will need to open the file in a text editor and copy each certificate and private key (including the BEGIN/END statments) to its own individual text file and save them as certificate.cer, CACert.cer, and privateKey.key respectively.
Install package with specific version
Install-Package EntityFramework -version 6.1.3
Run migration for specific connection string name
Update-Database -ConnectionStringName applicationDB2
Add migration with name "AddStateToUser" and compare database structure from specific connection string name
In this exemple of configuration, if the first server fail (proxy_connect_timeout) one time (max_fails), the second server will be used for 60s (fail_timeout).
The SSL certificate need to be configure on the ReverseProxy server AND the proxyied servers. You can use the same certificate and configurations on all servers.
To test the configuration you can change your host file to simulate the correct domain name.
Use the following tool to configure SSL with optimal configuration.