08. Installing DVWA on DigitalOcean - tandihansvin/EthicalHacking GitHub Wiki
Steps
1. Prepare and Create a Droplet
Fortunately, digitalocean already provide an ubuntu installation with apache inside it.
2. Download DVWA on your server
Since it was a freshly installed ubuntu, we need to configure something. First, we need to install unzip by runnning apt install unzip
command. Afterward,cd /var/www
and download the DVWA into your machine
wget https://github.com/ethicalhack3r/DVWA/archive/master.zip
.
unzip master.zip
And we need to let any user to read and write the file by running this command:
chmod -R 755 DVWA-master
chown -R www-data:www-data DVWA-master
3. Configure the Apache
cd /etc/apache2/sites-available
Make a configuration file, by coping the default configuration. Make it listen to private IP and change the docroot to /var/www/DVWA-master
cp 000-default.conf 001-dvwa.conf
When you finish configuring the 001-dvwa.conf file, the next things to do are enabling the DVWA site and disable
the default site (apache default site) and last thing is just restart your apache.
a2ensite 001-dvwa
a2dissite 000-default
systemctl restart apache2
4. Configuring DVWA
First, find your database password and copy it! Usually in DigitalOcean, it will be stored in ~/.digitalocean_password
. Open the /var/www/DVWA-master/config
directory. Afterward, copy cp config.inc.php.dist config.inc.php
or just rename the file mv config.inc.php.dist config.inc.php
. Lastly, just paste your database password on config.inc.php
.