Build a server on WWW-install and configure

Source: Internet
Author: User

The WWW server uses the software Apache and the service daemon process is httpd. The installation and configuration process is as follows:

1. First, yum install httpd will download and install Apache Software. You can use apachectrl-V to view the version. It is found that 2.0 + can support IPv6 Access.

2. enable port 80 of the firewall. Change iptables and ip6tables respectively. Vim/etc/sysconfig/iptabales is as follows (ip6tables is consistent)

*filter:INPUT ACCEPT [0:0]:FORWARD ACCEPT [0:0]:OUTPUT ACCEPT [0:0]-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT-A INPUT -p icmp -j ACCEPT-A INPUT -i lo -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT-A INPUT -j REJECT --reject-with icmp-host-prohibited-A FORWARD -j REJECT --reject-with icmp-host-prohibitedCOMMIT

Httpd starts TCP on port 80 and UDP on port 53. When UDP fails, a TCP packet is sent.

Of course, the firewall is especially loose here. Strictly put, the input should be drop by default, and then open to the specific IP address, port, and Mac.

3. test on the browser, http: // 10. 103. *. *: 80 and http: // [2001: da8: *****: da3f]: 80 can be successfully accessed. Note that when accessing IPv6, add [] to the address 【]

Build a server on WWW-install and configure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.