Overview
This page covers the most common issues encountered when setting up and running DVWA, including 404 errors, blank screens, and log file locations.For video troubleshooting, watch Fixing DVWA Setup Issues.
Common Problems
I browsed to the site and got a 404 or Apache2 default page
I browsed to the site and got a 404 or Apache2 default page
Understanding File Locations
By default, the Apache document root (the place it starts looking for web content) is/var/www/html.Example: If you put the file hello.txt in this directory, to access it you would browse to http://localhost/hello.txt.If you created a directory and put the file in there - /var/www/html/mydir/hello.txt - you would then need to browse to http://localhost/mydir/hello.txt.Case Sensitivity
Linux is by default case sensitive. If you created/var/www/html/mydir/hello.txt, the following URLs would all result in 404 Not Found:http://localhost/MyDir/hello.txthttp://localhost/mydir/Hello.txthttp://localhost/MYDIR/hello.txt
How This Affects DVWA
Most people use git to clone DVWA into/var/www/html, which gives them the directory /var/www/html/DVWA/ with all the DVWA files inside it. They then browse to http://localhost/ and get either a 404 or the default Apache welcome page.Solution: As the files are in DVWA, you must browse to http://localhost/DVWA.Key takeaway: After setup, if you try to visit the site and get a 404, think about:- Where you installed the files
- Where they are relative to the document root
- What the case of the directory you used is
I browsed to the site and got a blank screen
I browsed to the site and got a blank screen
The Problem
This is usually one configuration issue hiding another issue. By default, PHP does not display errors, and so if you forgot to turn error display on during the setup process, any other problems (such as failure to connect to the database) will stop the app from loading but the message to tell you what is wrong will be hidden.The Solution
Make sure you setdisplay_errors and display_startup_errors in your PHP configuration and then restart Apache.PHP Configuration File Locations:/etc/php/x.x/fpm/php.ini/etc/php/x.x/apache2/php.ini
Where are the log files?
Where are the log files?
Linux Log Locations
On Linux systems, Apache generates two log files by default:access.logerror.log
/var/log/apache2/.Viewing Recent Logs
When submitting error reports or troubleshooting, include at least the last five lines from each log file:Verify Your Configuration
If you receive an error while trying to create your database, make sure your database credentials are correct within./config/config.inc.php. This differs from config.inc.php.dist, which is an example file.Getting More Help
For the latest troubleshooting information, read both open and closed tickets in the GitHub repository: https://github.com/digininja/DVWA/issuesBefore submitting a ticket, please make sure you are running the latest version of the code from the repo. This is not the latest release, this is the latest code from the master branch.
