bjskistad bjskistad - 3 months ago 9
Apache Configuration Question

Replacing Apache Dir with File?

So, I have an apache server, and a

api
directory. When you go to
/api
it shows the directory's contents, which looks somewhat like this

Index of /api

[ICO] Name Last modified Size Description
[PARENTDIR] Parent Directory -
[ ] admins 2016-08-10 22:29 15
[ ] users 2016-08-10 22:17 30
Apache/2.4.7 (Ubuntu) Server at quea-bjskistad.c9users.io Port 443


Instead of showing this, I want it to show a file that goes by the path of
.*quea/api.html
. What do I need to do to accomplish this?

Answer

You could use an alias, check https://httpd.apache.org/docs/current/mod/mod_alias.html

Something like:

Alias /api /path/to/api.html

Or just rename api.html to index.html and put it in the api folder, but I must be missing something as a I don't understand your .*quea/api.html path...

Comments