0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Apache 配置

Last updated at Posted at 2025-07-24

关机

sudo shutdown

重启

sudo reboot

下载 apache

sudo dnf install -y httpd httpd-tools httpd-devel httpd-manual

开启 80 端口

# ServerName www.example.com:80
ServerName WebServer:80

默认访问目录

/var/www/html/

更新 linux

sudo dnf update -y

安装 zip

sudo yum -y install zip

apache 配置文件

/etc/httpd/conf/httpd.conf

查看 apache 配置是否正确

apachectl configtest

apache 启动

sudo systemctl start httpd

停止 apache

sudo systemctl stop httpd

查看 apache 状态

sudo systemctl status httpd

设置自动启动

sudo systemctl enable httpd.service

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?