0

Where would one typically store all the web pages and everything?

2 Answers 2

3

Depends on the distro/OS (and Webserver) but with Apache, it's usually /var/www/ (Debian/Ubuntu), /usr/local/www/ (FreeBSD), or depending on how/what you're doing, could also be in /home/user/htdocs|www|public_html.

2
  • Do you know of what is typical for Solaris? Feb 26, 2011 at 15:46
  • 1
    The default Solaris configuration has /var/apache/htdocs and /var/apache2/htdocs depending if you run the 1.x or 2.x version.
    – JOTN
    Mar 6, 2011 at 19:42
3

@gravyface gave a good general list of places to check. Here's a way to determine the exact web file location on a random unix or linux system:

Run /usr/sbin/httpd -V, then look for two things:

-D HTTPD_ROOT="/etc/httpd"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

Combining those gives you the config file location, in this case /etc/httpd/conf/httpd.conf.

Look through that file for DocumentRoot. There may be more than one DocumentRoot if the system is configured for virtual hosts, find the one not in a vhost directive.

In this case, it's

DocumentRoot "/webdocs"

which tells you that the webpages are stored under /webdocs.

1
  • For Ubuntu it's /usr/sbin/apache2 -V and SERVER_CONFIG_FILE contains the whole path.
    – user9517
    Feb 26, 2011 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .