- 积分
- 16843
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
centos8 安装http版局域网yum源; l S! a/ h& r- z) U. q0 H( u
安装http:
* ~* q& i- D6 h! @, d6 wdnf install -y httpd* Z6 l& G$ i; A
: G+ f8 H+ ? l3 t 配置http.conf文件:
; l c4 X% u; `1 h% Z1 E) i! c4 |2 V5 W# e- c
修改httpd守护进程用户:! m' A) e6 \! V% @& U2 X2 E8 C
User nobody! k" P4 [* u, Z6 g& _" f& e
Group nobody
1 S3 M5 Z) T; Y5 L9 E
& `# d0 P, ~5 t: O5 }4 E' Q6 h# z3 c4 u. \( i
<Directory "/var/www/html">$ t+ f2 R& u' e. H5 [0 \
AllowOverride ALL ^. x8 E2 _, s
Require all granted
% }, O3 V) J5 _7 w< /Directory>3 P5 M3 c8 c i
<Directory "/var/www/html">
8 U/ B: t& f$ W* I# } Options Indexes FollowSymLinks
5 M/ | F4 _$ e& Z! u4 k, U5 T6 b- X& \ AllowOverride ALL9 K' a1 R- @4 p( p1 ^/ f/ K
Require all granted
7 g/ `' z5 P7 t; w< /Directory>
" `! R1 m+ x/ x% P: K/ w5 I <IfModule dir_module>
' y0 @+ ~3 }" z DirectoryIndex index.html index.cgi index.php
* k7 V1 L! y, X) e< /IfModule>
( T$ `- y0 {5 z
# c. f& V- z( I% l, X配置hosts域名解析:' ?: u/ ]) V9 J- h/ U& x
4 A! @- V! m" \9 E* U; \
关闭selinux
2 P9 M( `- Y4 \9 T& Z" S sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
; I$ n6 N V) m0 ]启动/重启httpd.service服务
: Z0 H3 M. G* Csystemctl start httpd.service! x" T$ ^0 C; V
systemctl restart httpd.service
9 Z; a0 b8 V) B- @$ y j访问:http://IP/centos/ D: q$ ?5 ?/ p! d. p$ a' D
1 W% Z3 s1 Y6 L0 i1 n |
|