Categories
DevOps

Add FTP User on AWS EC2 Instance

1. Enable Password Authentication

1.1. Update “PasswordAuthentication:yes” in sshd_config

sudo vi /etc/ssh/sshd_config

1.2. Assign password to main user

sudo passwd [USERNAME] # for ec2 its ubuntu

1.3. Restart sshd service

sudo service sshd restart

2. Configure vsftpd to allow access

Categories
DevOps

Learning NGINX

Install NGINX

sudo su -
apt update
apt upgrade
apt install nginx
nginx -v

Confirm NGINX is working by navigation to localhost

NGINX Files and Directories

  • /etc/nginx (Configurations)
  • var/log/nginx (Access and error logs)
  • var/www/html (Default directory)

Commonly Used Commands

systemctl status nginx # check status
systemctl start nginx # start server
systemctl stop nginx # stop server
systemctl is-active nginx
systemctl reload nginx
nginx -h # help
nginx -t # test config without reboot
nginx -T # test config and cat file on screen

Main configuration file of nginx is located in /etc/nginx/nginx.conf (review this) but we will keep our configuration in /etc/nginx/conf.d

Unlink default unlink /etc/nginx/sites-enabled/default