Restart apache under linux and check the php environment

小云云
Release: 2023-03-21 06:14:02
Original
3154 people have browsed it

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!