Home  >  Article  >  Backend Development  >  Restart apache under linux and check the php environment

Restart apache under linux and check the php environment

小云云
小云云Original
2018-03-09 13:43:503170browse

This article mainly shares with you how to restart apache and check the php environment under Linux. This article mainly shares with you the code. I hope it can help you.

First switch to the init.d directory

cd /etc/rc.d/init.d

Then ls lists the directory:


Use httpd -v Check the installed httpd version,


Use rpm -qa | grep httpd to check whether httpd is installed


Use ps -ef | grep httpd to view the httpd process

Use service httpd status to view the running status of httpd

Use service httpd stop to stop httpd

Use service httpd start to start httpd

service After the httpd service is started, you can enter http://localhost in the browser to browse and test. If you can see the page shown below, it means that Apache can normal work.

If apache is installed as a Linux service, you can use the following command:

service httpd start start

service httpd restart restart

service httpd stop Stop the service

Related recommendations:

Examples of how to set up compression and caching for Apache in Linux

php and apache Detailed explanation of relationships and functions

Detailed introduction to installing the php environment under Linux and configuring Nginx to support the php-fpm module (pictures and texts)

The above is the detailed content of Restart apache under linux and check the php environment. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn