Here are several different ways to test a TCP port without telnet.
BASH (man page)
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
| ### | |
| # There's a newer version available here: | |
| # https://github.com/itaysk/kube-imagepuller | |
| # All future updates will be made there. | |
| # Please also post you questions as issues on that repo instead of commenting here | |
| ### | |
| apiVersion: apps/v1beta2 | |
| kind: DaemonSet |
Here are several different ways to test a TCP port without telnet.
$ cat < /dev/tcp/127.0.0.1/22
SSH-2.0-OpenSSH_5.3
^C
$ cat < /dev/tcp/127.0.0.1/23
| #!/usr/bin/env python | |
| import sys | |
| import yaml | |
| import json | |
| # Assumed we want to use stdin and stdout | |
| print json.dumps(yaml.load(sys.stdin.read()), indent=4) | |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Metadata: {} | |
| Parameters: | |
| ########### | |
| KeyName: | |
| Description: The EC2 Key Pair to allow SSH access to the instance | |
| Type: 'AWS::EC2::KeyPair::KeyName' | |
| AvailabilityZone: | |
| Description: Availability zone to deploy |
| heat_template_version: 2013-05-23 | |
| description: > | |
| This template creates an AutoScalingGroup based on the stack | |
| defined in the file `server_with_floating.yaml`. | |
| parameters: | |
| key_name: | |
| type: string | |
| description: Name of an existing key pair to use for the instances |
| heat_template_version: 2013-05-23 | |
| description: > | |
| This template creates an AutoScalingGroup based on the stack | |
| defined in the file `server_with_floating.yaml`. | |
| parameters: | |
| key_name: | |
| type: string | |
| description: Name of an existing key pair to use for the instances |
| heat_template_version: 2013-05-23 | |
| description: > | |
| This template creates an AutoScalingGroup based on the stack | |
| defined in the file `server_with_floating.yaml`. | |
| parameters: | |
| key_name: | |
| type: string | |
| description: Name of an existing key pair to use for the instances |
| # This is my Ruby DNS Updater script. If you are using an .htaccess | |
| # file to forward a domain or subdomain to your server's dynamic IP | |
| # address, this script will make sure that file stays updated with | |
| # your server's current address. This script is an alternative to | |
| # using services like Dynamic DNS. | |
| # This script uses SFTP and the 'net-sftp' gem to connect to your | |
| # hosting via a secure connection. You must add all your relevant | |
| # information below in order for this script to work. |
Php fpm is the new way to setup php to run with your webserver. Php-fpm is a fastcgi process manager for php that is totally separate from the webserver. The webserver communicates with fpm through a socket and passes the name of the script to execute. So fpm can run with any web server that is fastcgi compatible.
I recently moved from my old shared hosting to linode. Linode provides linux vps hosting at economic prices. However the servers are totally unmanaged are just raw linux machines that have shell access. So through the shell you have to setup everything including the web server, php and the web files.
So this time I decided to go with the combination of nginx and php-fpm. I had multiple sites to setup on this new webserver. Nginx deals with these through separate server blocks (aka vhost in apache). However there was another thing needed. Php on each site should run with its own user and not the nginx common user named www-data.
Running each site with its own uid/gid is more secure and