My web app is running after being deployed on Apache2 (local OS is Ubuntu 18.04 LTS). There is a plethora of controller-related urls like localhost://get_id/<id>
or localhost://delete/<id>
. Whenever I enter them into search mask, page of my we site appears here, well. What brings me into misunderstanding is a problem of opening any local file inside Apache root directory (/var/www/html
) instead of getting content by urls. To be more specific: I have file sample.txt
within directory /var/www/html/samples
. Now I need to display what this file contains but after typing localhost/samples/sample.txt
(suggesting that localhost
file source is just /var/www/html
) it fails to show anything like sample.txt
though Not found
.
Virtual host configurations are defined as below:
<VirtualHost *:80>
ErrorLog ${APACHE_LOG_DIR}/site-error.log
CustomLog ${APACHE_LOG_DIR}/site-access.log combined
<Location />
ProxyPass unix:/var/www/html/site/site.sock|http://127.0.0.1/
ProxyPassReverse unix:/var/www/html/site/site.sock|http://127.0.0.1/
</Location>
</VirtualHost>
I see clear it's a case of missing configuration for a virtual host - which exactly? I was looking for any earlier posts, questions and answers (that's pretty simple issue, so it was responded in the past, I'm sure), but without success. Let me note I'm a newbie to server technologies like Apache, my experience doesn't enable me to solve that matter myself so far. So, how do I want to implement file paths instead of web site url, essentially? Any pointer will be kindly appreciated.