Nikita
Nikita

Reputation: 37

Apache CONF: How to add outside directories without showing the location in source

I'm having a real brain fart right now, and forgot whats required in httpd.conf to include files from directories outside the web root folder. The whole idea is that I can call files from other folders, without listing the location in the HTML/PHP source files.

Having a hard time searching through google and apache's site, could someone refresh my memory?

EDIT: Example, I'm using 'require_once "pdo-db-conn.php";' in a PHP file, but php-db-conn.php is actually outside the web root. The idea is that I don't need to list the external directory within my production php source code.

I've done it before, and it included listing directories which apache would search for files.

Upvotes: 0

Views: 146

Answers (1)

Burhan Khalid
Burhan Khalid

Reputation: 174662

For Apache, you are looking for either Alias or AliasMatch.

For PHP, you are looking for include_path

Upvotes: 1

Related Questions