How to install apache under centos

王林
Release: 2020-06-24 17:45:12
forward
5633 people have browsed it

The method to install apache under centos is: 1. Execute the [yum install httpd] command to install httpd; 2. Open the configuration file and change [AllowOverride None] to [AllowOverride All]; 3. Restart the server.

How to install apache under centos

(Recommended tutorial:apache from beginner to master)

The specific method is as follows:

1. Install httpd

yum install httpd
Copy after login

When installing httpd, the following dependency packages will be automatically installed:

How to install apache under centos

Select y and install the downloaded installation package.

2. Configuration

Open the configuration file and change all AllowOverride None inside to AllowOverride All

vi httpd.conf
Copy after login

By the way, add index.htm index after DirectoryIndex index.html. php index.shtml

:wq Save and exit

3. Restart the server

service httpd restart
Copy after login
systemctl start httpd.service #启动apache systemctl stop httpd.service #停止apache systemctl restart httpd.service #重启apache systemctl enable httpd.service #设置apache开机启动
Copy after login

4Test

Enter the corresponding URL in the browser, and the following interface will appear It means the configuration is successful.

How to install apache under centos

The above is the detailed content of How to install apache under centos. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
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
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!