Mert Ilis

Nov 24, 2017

4 min read

Hosting ASP.NET Core 2.0 Web Api on Azure Ubuntu Server with Nginx and Mutual SSL Authentication (PART 3)

PART 3: Configuring Azure Network Security Group, Publishing .Net Core Web Api

Configure Azure Network Security Group for Inbound Port Rules

Configure Ubuntu for FTP Access

sudo apt-get update
sudo apt-get install vsftpd
sudo cp /etc/vsftpd.conf /etc/vsftpd.conf.orig
sudo adduser mcftp
echo "mcftp" | sudo tee -a /etc/vsftpd.userlist
sudo mkdir /home/mcftp/ftp
sudo chown nobody:nogroup /home/mcftp/ftp

sudo chmod a-w /home/mcftp/ftp

sudo mkdir /home/mcftp/ftp/files

sudo chown mcftp:mcftp /home/mcftp/ftp/files
sudo nano /etc/vsftpd.conf
write_enable=YES
chroot_local_user=YES
user_sub_token=$USERlocal_root=/home/$USER/ftppasv_min_port=40000pasv_max_port=50000userlist_enable=YESuserlist_file=/etc/vsftpd.userlistuserlist_deny=NO
sudo systemctl restart vsftpd

Install unzip

sudo apt-get update
sudo apt-get install unzip

Publish ASP.Net Core 2.0 Web Api to a Folder

Sending Documents from Development Machine via Ftp (It’s not secure!)

ftp [ubuntu_server_dns_name]
cd files
put PublishOutput.zip
mkdir webapi
sudo cp /home/mcftp/ftp/files/PublishOutput.zip /home/mc/webapi
cd webapi
sudo unzip PublishOutput.zip
sudo mv PublishOutput/* .
sudo rm -r PublishOutput