View previous topic :: View next topic |
Author |
Message |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Mar 25, 2021 2:16 pm Post subject: Configuring Abyss Web Server on Ubuntu Server 20.04 |
|
|
Configuring Abyss Web Server on Ubuntu Server 20.04
This tutorial is outdated because it uses PHP version 7, which was discontinued on November 3rd, 2022. Please use the updated tutorial here.
This tutorial explains the configuration for setting up Abyss Web Server X2 on Ubuntu Server 20.04.2 LTS. If you're running a different distro such as Fedora or CentOS, you will need to use different commands for some of the steps such as installing the packages and modifying the sudoers file. This guide also assumes that you configured the network settings for a static IP Address and enabled the OpenSSH server during the installation process. You can follow this guide from a Virtual Machine using a program like VirtualBox or a dedicated server (my preferred choice). If you haven't already installed the server, download it from the official Ubuntu website. There are many video tutorials out there explaining how to set up Linux. I hope you find this tutorial helpful. It's good to be back in the Aprelium community!
FROM THE CLIENT COMPUTER:
Connect to the server from the client side
Open Windows PowerShell and enter the following command: Code: | ssh yourUserName@serverip | Note: SSH is installed by default on Windows 10 1909 or higher. Click here for details on installing it on an earlier version. PuTTY also has an SSH client but I find using Windows PowerShell convenient since you can copy and paste information into the command window.
FROM THE SSH TERMINAL:
Configure your account so that password is disabled for sudo command. You don't need to do this but it makes life easier.
Add this to the end of the configuration file Code: | youUserName ALL=(ALL) NOPASSWD:ALL | Press CTRL+O, Enter, then CTRL+X to save changes and exit.
Set time zone of server so it matches your local time (I'm U.S. Eastern Time)
Code: | sudo timedatectl set-timezone America/New_York | Note: sudo timedatectl list-timezones will display a list of time zones to choose from.
Create the user for managing the server and the folders we will use for our setup
Code: | sudo adduser server
su server
cd ~
mkdir -p .ssh public_html/default apps |
Download and install FileZilla FTP Client
https://filezilla-project.org/download.php?show_all=1
Use FileZilla FTP Client to connect to server account using SFTP
Upload the tgz file for abyssws into ~/apps
Upload website files into ~/public_html/default
FROM THE SSH TERMINAL:
Install Abyss Web Server
Code: | cd apps
tar xzfm abwsx2-2-14-1.tgz
cd abyssws
./abyssws | This will generate a configuration file. Press CTRL+C to exit program.
Edit abyss.conf to allow your external IP Address.
Look for console > ipcontrol and add an <allow> tag to include your external IP Address. To find your IP Address, I like to use ipchicken.com but Aprelium also has an IP detector here. This will allow you access to the abyssws console remotely while blocking everyone else. Save your changes and exit by pressing CTRL+O, Enter, then CTRL+X.
Run the program again.
FROM THE WEB BROWSER:
Log into server from http://serverip:9999 to enter any licensing information and to setup the initial user to log into the console. Do not exit the web browser!
FROM THE SSH TERMINAL:
Install Abyss Web Server as a service
Press CTRL+C to close abyssws
Code: | su yourUserName
sudo ./autostart-setup install
sudo systemctl start abyssws |
FROM THE WEB BROWSER:
Change the port to 80
Change the document root to /home/server/public_html/default
FROM THE SSH TERMINAL:
Make sure you have the latest package updates
Code: | sudo apt update
sudo apt -y upgrade |
Optional packages for those that require PHP 7.4 scripting. Unfortunately it doesn't appear PHP 8.0 is included in Ubuntu 20.04.2 LTS so you will need to manually compile your own. A tutorial on that will follow in the future.
Code: | sudo apt -y install php7.4-cgi
sudo apt -y install php7.4 php7.4-mysqlnd php7.4-opcache php7.4-pdo php7.4-xml php7.4-bz2 php7.4-calendar php7.4-ctype php7.4-curl php7.4-dom php7.4-exif php7.4-ffi php7.4-fileinfo php7.4-ftp php7.4-gd php7.4-iconv php7.4-json php7.4-mbstring php7.4-mysqli php7.4-pdo-firebird php7.4-pdo-mysql php7.4-pdo-pgsql php7.4-pgsql php7.4-phar php7.4-posix php7.4-readline php7.4-shmop php7.4-simplexml php7.4-sockets php7.4-sysvmsg php7.4-sysvsem php7.4-sysvshm php7.4-tokenizer php7.4-xmlreader php7.4-xmlwriter php7.4-xsl | Note: Please see the documentation for installing PHP on Linux for more details.
Securing your server
At this point, you have a fairly secure server. To make it even more secure, we need to enable the firewall and make sure that we disable password authentication so that only key files are allowed. This prevents attackers from brute forcing into your server (guessing the user and pass multiple times).
FROM THE CLIENT COMPUTER:
Generating the key pair (public and private key) for SSH access
Open Windows PowerShell and run the following command: Code: | ssh-keygen -t ecdsa -b 521 | Note: You don’t need to enter a password but it's a good idea to enter one, that way if someone gets a hold of your private key file id_ecdsa, they would need a password to access the server. Unfortunately this is an inconvenience because every time you connect to the server you will require both the key and the password. As long as you use Bit Locker to encrypt your hard drive and keep your security software up to date, you shouldn't need a password. Do not store the private key file on the Internet unless you know it's in a secure location! OneDrive Personal Vault makes a great location if you want to store it as a backup in the cloud. The public key file is located in C:\Users\yourUserName\.ssh and it's named id_ecdsa.pub)
Download and open PuTTY Key Generator (named puttygen.exe)
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
In order for FileZilla to understand the key file, we need to import the id_ecdsa file (private key) into PuTTY Key Generator and save the private key file as server.ppk into the .ssh folder of your client computer. I won't go into detail how to import the key because it's self explanatory. Just make sure the options after importing are set to use ECDSA and number of bits is 521. ECDSA is the strongest encryption approved by the U.S. Government.
FROM FILEZILLA FTP CLIENT:
Upload the public key file (id_ecdsa.pub) to ~/.ssh and rename the file to authorized_keys
Configure FileZilla to use the key file. You can find this setting where you edit the sites. Open the server.ppk file you created earlier as the key file. Save your changes. You no longer require a password to SSH into the server.
FROM THE SSH TERMINAL:
Configure and restart the SSH service Code: | sudo nano /etc/ssh/sshd_config | uncomment: PermitRootLogin and change option to no
uncomment: PubKeyAuthentication and change option to yes
uncomment: AuthorizedKeyFiles
uncomment: PasswordAuthentication and change option to no
Press CTRL+O, Enter, then CTRL+X to save changes and exit. Code: | sudo systemctl restart ssh |
Configure Firewall to allow ports 22, 80, 443, and 9999
Code: | sudo ufw allow 22
sudo ufw allow 80
sudo ufw allow 443
sudo ufw allow 9999
sudo ufw enable |
Congratulations!!!
You can configure the server however way you want now.
Best regards,
Josh H (TRUSTAbyss)
Last edited by TRUSTAbyss on Thu Dec 22, 2022 1:01 pm; edited 16 times in total |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1308
|
Posted: Fri Mar 26, 2021 9:53 pm Post subject: Re: Configuring Abyss Web Server on Linux (Ubuntu Server 20. |
|
|
TRUSTAbyss,
Thank you for your contribution. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Mar 30, 2021 12:12 am Post subject: |
|
|
Thanks. I tweaked the package installation commands to include the full package name and version of PHP to be installed. It doesn't look like Ubuntu has a package for PHP 8.0 yet. It's still very new and I prefer PHP 7.4. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1308
|
Posted: Wed Mar 31, 2021 9:08 pm Post subject: |
|
|
TRUSTAbyss wrote: | Thanks. I tweaked the package installation commands to include the full package name and version of PHP to be installed. It doesn't look like Ubuntu has a package for PHP 8.0 yet. It's still very new and I prefer PHP 7.4. |
Ubuntu and Debian are distributions that are a bit conservative in adopting new versions of most software. This is the case today for PHP as you noted. But it was also the case for Python way before when they continued to offer version 2.7 when version 3.0 was already released. _________________ Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com |
|
Back to top |
|
|
unknown -
Joined: 26 Mar 2021 Posts: 2 Location: Italy
|
Posted: Wed Mar 31, 2021 11:27 pm Post subject: I confirm the validity of the guide. :D |
|
|
I followed everything to the letter step by step and everything went well. Thanks for your valuable contribution. _________________ IRCserveR Italia |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Apr 01, 2021 11:34 pm Post subject: Re: I confirm the validity of the guide. :D |
|
|
unknown wrote: | I followed everything to the letter step by step and everything went well. Thanks for your valuable contribution. |
You're welcome! More tutorials will follow in the future. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Dec 22, 2022 11:55 am Post subject: |
|
|
Turns out this tutorial is now outdated because PHP 8 took over PHP 7 since November 3rd. I added a note linking to the new tutorial at the top of the page. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1308
|
|
Back to top |
|
|
|