Learning Mysql


Configuring and Controlling the Apache Web Server | 83



Download 4.24 Mb.
View original pdf
Page81/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   77   78   79   80   81   82   83   84   ...   366
Learning MySQL
Configuring and Controlling the Apache Web Server | 83

server by using the appropriate XAMPP startup command, or the apachectl or apache2ctl commands described later in this section in Starting and Stopping
Apache.”
If you see some response when you try to load a page in your browser, you can try placing content in the server’s document root. Let’s see how to find this directory.
The Apache Document Root
The document root is the base or parent directory in which the web server stores web resources (such as HTML, PHP, or image files) and serves them to web browsers. For the Apache web server, common locations of the document root include:
Linux
/var/www/html, /var/www/htdocs, or /var/www fora distribution installation /usr/
local/apache/htdocs fora standalone installation, and /opt/lampp/htdocs for an
XAMPP installation.
Windows
C:\Program Files\xampp\htdocs for an XAMPP installation, and C:\Program Files
\Apache Group\Apache2\htdocs if Apache is installed independently
Mac OS X
/Applications/xampp/htdocs for an XAMPP installation, and /Library/WebServer/
Documents for the installation of Apache that is part of the standard Mac OS X
configuration
If you’re using a Linux system and don’t know where your server’s document root is,
search for it by following these instructions.
First, login as the system superuser by typing
su -
in a terminal window. Then try to list the common document root directories that we listed previously ls -directory /var/www/html /var/www/htdocs /var/www /usr/local/apache/htdocs
/bin/ls: /var/www/htdocs: No such file or directory
/bin/ls: /usr/local/apache/htdocs: No such file or directory
/var/www /var/www/html
The directory option asks the ls program to list only directory names, and not their contents.
If you get an error message fora directory, that directory doesn’t exist. Where the directory name is listed, as for /var/www and /var/www/html above, the directory exists.
One of these is likely to be the document root. If none of the directories exist, you can try searching your whole filesystem fora directory called htdocs
:
# find / -typed -name htdocs
Be patient this may take a few minutes. Any directory it finds is likely to be the directory root if more than one is found, you’ll need to experiment by creating files in each to determine which is the one used by your Apache installation.

Download 4.24 Mb.

Share with your friends:
1   ...   77   78   79   80   81   82   83   84   ...   366




The database is protected by copyright ©ininet.org 2024
send message

    Main page