DVWA Installation: Download The Package of DVWA Inside /var/www/html Directory

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

DVWA Installation

1. download the package of DVWA inside /var/www/html directory.

2. Rename the DVWA’s configuration file located at /config directory


from config.inc.php.dist to config.inc.php

3. And give 777 permissions to main DVWA directory by typing “chmod -R 777 DVWA/”

4. Make sure that your MySQL service must be started (service mysql start)

5. To Login into MySQL, the command is:

mysql -u root –p

6. And then run the following commands inside MySQL console which creates a new database named
as dvwa and user [email protected] with password pass:

Command: CREATE DATABASE dvwa;


Command: CREATE USER ‘user’ IDENTIFIED BY ‘pass’;
Command: GRANT ALL ON dvwa.* TO ‘user’
Command: FLUSH PRIVILEGES;
Command: EXIT

7. Edit your DVWA configuration file (located at /config/config.inc.php) and edit the details as per
below screenshot.
8. You also need to do a last change in php.ini file (located at /etc/php/7.2/apache2/php.ini) with the
following changes:

allow_url_fopen = On
allow_url_include = On

9. And at the end, Start your apache server by typing “service apache2 start”
 Change Apache default port to a custom port

Change Apache port on Debian/Ubuntu. Edit /etc/apache2/ports.conf file

You might also like