Learning Mysql


Starting and Stopping Apache



Download 4.24 Mb.
View original pdf
Page83/366
Date04.08.2023
Size4.24 Mb.
#61806
1   ...   79   80   81   82   83   84   85   86   ...   366
Learning MySQL
Starting and Stopping Apache
Apache web server installations usually include a control script called apachectl that you can use to start or stop the server. On newer installations this is sometimes called
Configuring and Controlling the Apache Web Server | 85

apache2ctl
; if the examples below don't work for you, try replacing apachectl with apache2ctl
. You can generally start an installed Apache server by using the command apachectl start
If this fails on a Linux or Mac OS X system because the command isn't found, use the find command to locate the apachectl script file find / -type f -name apachectl
On a Windows system, use the builtin search instead of the find command. If it’s reported as being in, say, /usr/local/apache/bin/apachectl, try starting Apache using that full path /usr/local/apache/bin/apachectl start
Apache should start, and you should be able to test it by loading the web page http://
localhost in your browser.
You can stop the server by typing apachectl stop
If you make a change to the web server configuration file, you can stop and start the server in one go by typing apachectl restart
If you have an XAMPP installation, you can more easily start and stop the Apache web server using the XAMPP control scripts (Linux and Mac OS Xor control panel (Windows. Earlier, we described how to do this alongside our XAMPP installation instructions for each operating system.
Checking Whether Your Apache Installation Supports PHP
Once you’ve found your document root and have Apache running, you can check whether it can serve PHP requests, and whether its PHP engine has support for MySQL.
Using a text editor, create the file phpinfo.php so that it has one line with the following contents:

Save this file with the name phpinfo.php in the document root directory. On a Linux or
Mac OS X system, you can check the file permissions by listing the file,
ment_root>/phpinfo.php, for example ls -al /var/www/html/phpinfo.php
-rw------- 1 saied saied 20 Jul 22 11:35 /var/www/html/phpinfo.php
Here, only the user who owns the file (
saied
) has permission to read and write the file.
For the web server to read a file, the file should be readable by everyone. You can set the appropriate permissions as follows chmod u=rw,g=r,o=r path_to_document_root/phpinfo.php

Download 4.24 Mb.

Share with your friends:
1   ...   79   80   81   82   83   84   85   86   ...   366




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

    Main page