Where would one typically store all the web pages and everything?
2 Answers
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.
-
-
1The default Solaris configuration has /var/apache/htdocs and /var/apache2/htdocs depending if you run the 1.x or 2.x version.– JOTNMar 6, 2011 at 19:42
@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
.
-
For Ubuntu it's /usr/sbin/apache2 -V and
SERVER_CONFIG_FILE
contains the whole path.– user9517Feb 26, 2011 at 8:30