Lokomotywa
Lokomotywa

Reputation: 2844

Find out webroot in running apache 2

I am running an Apache Server and tried to change the webroot from a default location to my specific one, by chaning the path in sites-enabled. However, it does not work as expected and now, if I navigate to localhost, I get a 403.

Can I find out which Directory on my (running) Apache server is taken as my webroot?

(It's not the default value and not the specific one)

Upvotes: 2

Views: 4749

Answers (2)

Gilles Quénot
Gilles Quénot

Reputation: 185530

Without more details, a possible approach is to use like this :

grep -r DocumentRoot /etc/{apache,http}* 2>/dev/null

Upvotes: 4

Sobrique
Sobrique

Reputation: 53498

Depends what the httpd.conf says. A common default for httpd.conf is in /etc/httpd/conf. A common default for webroot is in /var/www.

Upvotes: 0

Related Questions