I have followed this instruction to install Brat and configure it:
sudo apt update
sudo apt install python3 python3-pip apache2
tar -xvzf brat-1.3_Crunchy_Frog.tar.gz
sudo mv brat-1.3_Crunchy_Frog /var/www/brat
Create an Apache configuration file for brat:
sudo nano /etc/apache2/sites-available/brat.conf
Added the following configuration:
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/brat
ScriptAlias /cgi-bin/ /var/www/brat/cgi-bin/
<Directory /var/www/brat/cgi-bin>
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /var/www/brat>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/brat_error.log
CustomLog ${APACHE_LOG_DIR}/brat_access.log combined
</VirtualHost>
sudo a2ensite brat.conf
sudo systemctl reload apache2
sudo chown -R www-data:www-data /var/www/brat
sudo chmod -R 755 /var/www/brat
sudo ufw allow 80/tcp
When I typed on Chrome http://localhost/brat/cgi-bin/admin.cgi
it showed “404 File not found”
I found later the cgi-bin
file is missing in var/www/brat
folder.