I have configured apache2 to run my django application on ubuntu server but I'm facing issue while uploading images at my desired directory, it goes into /var/www/ directory.
I have edited '000-default.conf' file in apache2 with the directory I want the webserver to take as root directory for my application as bellow.
DocumentRoot /home/ubuntu/project/
<Directory /home/ubuntu/project/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
and /etc/apache2/apache2.conf
<Directory /home/ubuntu/project/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
After this change I have restarted the web server. Still when my django application uploads any images it goes in /var/www/ directory. I don't understand why its happening even if I have changed the apache root directory from /var/www/ to /home/ubuntu/project/
Please suggest ...