Linux (11) _ Apache server, linux _ apache
Check whether apache is installed.
Rpm-qa | grep httpd
Install yum install httpd
Service httpd start
Test Apache server
Note: Firewall Configuration
This is the default firewall policy. It should be accessible from the browser, but it is blocked. The access is normal only when all rules are cleared by iptables-F.
Basic configuration of the apache server:
Default configuration file:
Write a simple page in the main directory:
By default, the website accesses this page.
Create a virtual directory:
First, create a file directory under the root directory:
/Xkj write an index.html page
Then set the virtual directory in the main configuration file:
Alias/xkj
And then access in the browser, but access is prohibited:
In linux, besides the iptables firewall, there is also the kernel firewall SELinux.
Disable it with setenforce 0
Getenforce view status
Still blocked. No reason is found.