How to install Ubuntu and configure a website in DigitalOcean droplet – Basic

You can run the below code after login using the command-line/putty

sudo apt-get update
sudo apt-get install apache2
sudo apt-get update
sudo apt-get install mysql-server
sudo mysql_secure_installation
sudo apt-get install phpmyadmin php-mbstring php-gettext
sudo phpenmod mcrypt
sudo phpenmod mbstring
sudo systemctl restart apache2
sudo apt-get install curl
sudo a2enmod rewrite
service apache2 restart

sudo nano /etc/apache2/sites-available/000-default.conf

Inside that file, you will find a <VirtualHost *:80> block starting on the first line. Inside of that block, add the following new block so your configuration file looks like the following. Make sure that all blocks are properly indented.


<VirtualHost *:80>
<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
. . .

Save and close the file. To put these changes into effect, restart Apache.

sudo systemctl restart apache2

After uploading the wordpress files run below command

chown -R www-data /var/www/html

Leave a Reply

Your email address will not be published. Required fields are marked *