Linux中配置Apache服务器

Linux中配置Apache服务器,第1张

[root@localhost

bbc]# setup

选择Network configuration

Eth1(eth1)-Advanced

Micro Devicesp[AMD] 79c970[PCnet32 LANCE]

Static

IP 192.168.0.108

Netmask

255.255.255.0

Default

gateway IP 192.168.0.1

Ok

Quit

Quit

使用vim编辑Apache http的配置文件:

[root@Linuxprobe ~]# vim /etc/httpd/conf/httpd.conf

前文省略……………………………………

ServerRoot "/etc/httpd"

32

33 #

34 # Listen: Allows you to bind Apache to specific IP addresses and/or

35 # ports, instead of the default. See also the <VirtualHost>

36 # directive.

37 #

38 # Change this to Listen on specific IP addresses as shown below to

39 # prevent Apache from glomming onto all bound IP addresses.

40 #

41 #Listen 12.34.56.78:80

42 Listen 80 #这是Apache的默认监听端口,修改你想要修改的端口就可以了

43

44 #

45 # Dynamic Shared Object (DSO) Support

46 #

47 # To be able to use the functionality of a module which was built as a DSO you

:wq #退出并保存

2.使用重新启动httpd服务:systemctl restart httpd (PS:这里使用的是RHEL 7.0系统)如果是7以下的系统,这里有详细介绍Apache的配置服务http://www.linuxprobe.com/chapter-09/。或者可以使用service httpd restart重启即可。

[root@Linuxprobe ~]# systemctl restart httpd

[root@Linuxprobe ~]#


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/8970329.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-04-23
下一篇2023-04-23

发表评论

登录后才能评论

评论列表(0条)

    保存