CentOS7 install apache and access other computers over a LAN

1. Installation Apache assembly

[root@mycentos shell]# yum install httpd

2. After a successful installation, testing whether the httpd process

[root@mycentos shell]# ps -e |grep httpd

3. If not, enable the service

[root@mycentos shell]# systemctl restart httpd.service

4. Use a browser to access the local IP address, if the display link fails, the display will deny access;

 

Related issues should be set up firewalls cause problems ServerName. And Apache configuration file httpd.conf in

cd /etc/httpd/conf

vi httpd.conf

Find #ServerName example.com:80, and remove the example URL changed localhost #

Open port 80

5. Shut down and disable the firewall

[Root @ mycentos shell] # systemctl stop firewalld.service # stop the firewall service

[root @ mycentos Desktop] # systemctl disable firewalld.service # Disable the firewall service startup
Removed The symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed The symlink /etc/systemd/system/basic.target. wants / firewalld.service.

6. visit the Web site again, able to successfully log

Guess you like

Origin www.cnblogs.com/xtmp/p/12656796.html