I have uploaded 2 django projects before and worked perfectly fine to the server, but now for some reason I am receiving this error. I have revisited a tutorial word by word and revised it several times, I am not sure why I keep receving this error:
You don't have permission to access this resource.Server unable to read htaccess file, denying access to be safe
Error for 403 Forbidden You don't have permission to access this resource. Apache/2.4.46 (Ubuntu) Server at Port 80
Here is the config file:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /static /home/ahesham/Portfolio/static
<Directory /home/ahesham/Portfolio/static>
Require all granted
</Directory>
Alias /media /home/ahesham/Portfolio/media
<Directory /home/ahesham/Portfolio/media>
Require all granted
</Directory>
<Directory /home/ahesham/Portfolio/Portfolio>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIScriptAlias / /home/ahesham/Portfolio/Portfolio/wsgi.py
WSGIDaemonProcess Portfolio python-path=/home/ahesham/Portfolio python-home=/home/ahesham/Portfolio/venv
WSGIProcessGroup Portfolio
</VirtualHost>
when i type ls -la
total 36
drwxr-x--- 5 ahesham ahesham 4096 Aug 6 23:08 .
drwxr-xr-x 3 root root 4096 Aug 5 02:30 ..
-rw------- 1 ahesham ahesham 2115 Aug 7 02:20 .bash_history
-rw-r--r-- 1 ahesham ahesham 220 Aug 5 02:30 .bash_logout
-rw-r--r-- 1 ahesham ahesham 3771 Aug 5 02:30 .bashrc
drwx------ 3 ahesham ahesham 4096 Aug 6 12:53 .cache
drwxrwxr-x 10 ahesham www-data 4096 Aug 6 20:15 Portfolio
-rw-r--r-- 1 ahesham ahesham 807 Aug 5 02:30 .profile
drwx------ 2 ahesham ahesham 4096 Aug 5 02:41 .ssh
-rw-r--r-- 1 ahesham ahesham 0 Aug 5 02:42 .sudo_as_admin_successful
when I try the project on an 8000 server it is woking perfectly fine other wise when I change the following commands: sudo ufw delete allow 8000
sudo ufw allow http/tcp
sudo service apache2 restart
My question is what am I doing wrong and how to fix it?
Please let me know if there are further information required to help assist fixing it