P
P
PentesterGgeek2019-11-02 10:46:07
Apache HTTP Server
PentesterGgeek, 2019-11-02 10:46:07

How to correctly specify the path to the files on the server (Apache)?

Hello, gentlemen IT-shniks.
I have a home computer on KDE neon, it became necessary to set up a simple local one-page HTML site on Apache (there are a lot of TV shows and movies on my computer, I want to watch them from a tablet or TV). The index.html file is located at the standard address /var/www/html/index.html. The videos are in the same html folder, but I can't find the correct path to them. And when I just open the html page in the browser, everything works, but when I try through the server, it does not see them. I have already tried all possible ways, re-read a bunch of everything, to no avail. Help, good people.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
AUser0, 2019-11-02
@AUser0

For the Apache web server, the /var/www/html directory is the DocumentRoot, i.e. root directory of the site, so for files in the same directory, you can write <a href='/filename.mpg'> . And since index.html is located in the same directory, you don't even have to specify the path: <a href='filename.mpg'> , the browser will substitute it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question