Hardware Reference
In-Depth Information
When the software installation has inished, both the MySQL and Apache servers—known
in Linux parlance as daemons —will be running in the background. To check that the server is
working correctly, use another computer on the network to connect to the Raspberry Pi
using a web browser. In the address bar, type the IP address of the Pi to display the default
Apache installation page (see Figure 9-3). If you're not sure what IP address the Pi is using,
type ifconfig at the terminal and look for the IP address listed in the eth0 section, or the
section corresponding to the network adapter in use on your Pi if you're not using the Model
B's built-in Ethernet port. For more information on checking and adjusting network settings
on the Pi, see Chapter 4, “Network Coniguration”.
Figure 9-3:
Connecting to
the Pi's Apache
server using a
web browser
he inal step is to conirm that the PHP scripting module is loaded correctly in Apache. his
module is important: it allows the Apache web server to run PHP scripts to serve dynamic
content. Without a working PHP module—or an alternative module for another scripting
language like Python—Apache is only able to server static pages. To test the Apache PHP
module, create a new PHP script ile using the following command, typed as a single line:
sudo sh -c 'echo “<?php phpinfo(); ?>” > Æ
/var/www/phptest.php'
Search WWH ::




Custom Search