gviaud icon

Ubuntu 18.04 Web Server install

gviaud | PRO | 10/11/18 03:12:53 AM UTC | 0 ⭐ | 276 👁️ | Never ⏰ | []
text |

810 B

|

None

|

0 👍

/

0 👎

sudo apt-get update
sudo apt upgrade
sudo apt update
sudo apt install apache2
sudo apt install php
sudo apt install php-curl
sudo apt install mcrypt
sudo chown -R www-data:www-data /var/www
 #Set hostname
sudo hostnamectl set-hostname HOSTNAME
sudo vim /etc/host
 # make www-data user ssh-able
sudo vim /etc/passwd
 sudo su www-data
cd /var/www
mkdir .ssh
cd .ssh
#add keys as needed
vim authorized_keys
chmod 700 ~/.ssh && chmod 600 ~/.ssh/*
 # Setup and install Virtualhost... 
# ..... TODO
 # Install Lets Encrypt 
sudo add-apt-repository ppa:certbot/certbot
sudo apt install python-certbot-apache
sudo certbot --apache -d example.com
 # Add auto-renew to crontab as follows:
# Let's Encrypt auto-renew
0  */12   *   *   *   /usr/bin/certbot renew
 #Be sure to restart everything.
sudo reboot

Comments