I am currently running this on a Raspberry Pi 2 with Debian "Raspbian GNU/Linux 9 (stretch)"
1. sudo apt-get update
2. sudo apt-get install apache2
3. sudo mkdir -p /var/www/yourdomain.com/public_html
4. sudo chown -R $USER:$USER /var/www/yourdomain.com/public_html
5. sudo chmod -R 755 /var/www
6. nano /var/www/yourdomain.com/public_html/index.html
----------------Add the following to the index.html file-------------
<html>
<head>
<title>Welcome to yourdomain.com!</title>
</head>
<body>
<h1>Success! yourdomain.com is working!</h1>
</body>
</html>
---------------------------end----------------------------------------
7. sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/yourdomain.com.conf
------------file should look like this--------------------------------
7.5 sudo nano /etc/apache2/sites-available/yourdomain.com.conf
This is what you will see......
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Change it to this......
8. ServerAdmin admin@yourdomain.com
9. ServerName yourdomain.com
10.ServerAlias www.yourdomain.com
11.DocumentRoot /var/www/yourdomain.com/public_html
Now should look like this....
<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/yourdomain.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
12.sudo a2ensite yourdomain.com.conf
13.sudo service apache2 restart
----------optional------------------
14.sudo nano /etc/hosts
111.111.111.111 yourdomain.com (ip is local ip of pi)
LeechFTP and CuteFtp dont have SFTP (either doesn't work right away or have to configure more. I couldn't get them to work as much as I tried. (couldn't find how to access SFTP))
FileZila has SFTP = Connection right away.
use your pi ip and pi user and password you don't need to enter port 22 as it is the default SFTP port.
After my last night message of being sleepy thought I would toss this again as reference for the next time I am too sleepy and need to look at my notes lol its down and dirty note form. if you need a explanation on this above just google setting up a pi site and should bring up info on each setting a more in depth walkthrough.
Just remember the quickest way to do this is probably ssh into your pi once you first start it up so make sure you go into the settings on the pi (Debian) and enable it. Then you can just copy and paste into putty or whatever your using.
I was going to try unbuntu server this time but will get there yet I just wanted to make sure I had something working.
I ran a wordpress website on the pi for over 2 years works great low power and as long as you update wordpress here and there its not that bad.
But I prefer to make my own I was being lazy and used wordpress. So now I get to have some fun now I got the ftp working as it should.
Also make sure to change your pi's password I would also suggest removing pi and user and adding another as well.
Think I got that all ok there anyone else have any input or am I missing anything?
Also thanks to those that gave me ideas last night and this morning to get things going properly.