Jump to content
  • 0

Installing Apache on CentOS 6.7


AinsLord

Question


  • Group:  Members
  • Topic Count:  271
  • Topics Per Day:  0.08
  • Content Count:  791
  • Reputation:   20
  • Joined:  11/21/15
  • Last Seen:  

ive tried this but the web doesnt show

 

Install Apache with the following command to begin the install:

  • sudo yum install httpd

Start Apache with the following command:

  • sudo service httpd start

We can now verify Apache is working by opening your browser and entering the URL http://your-server's-address

as image shows below

Install-LAMP-on-CentOS6-2.jpg

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  261
  • Reputation:   53
  • Joined:  11/11/16
  • Last Seen:  

Probably has something to do with this:

http://superuser.com/questions/502723/centos-6-iptables-preventing-web-access-via-port-80

https://www.zerostopbits.com/how-to-install-apache-mysql-and-php-on-centos-6-7/

Or for an easier answer:

Chances are, you’re also going to need to open up port 80 on the iptables firewall. To do that, we need to do the following:

 

nano /etc/sysconfig/iptables

 

Find the following line:

 

-A INPUT -i lo -j ACCEPT

 

And add the below line immediately underneath:

 

-A INPUT -m tcp -p tcp --dport 80 -j ACCEPT

 

Hit CTRL-O to save, and CTRL-X to close the configuration file.

 

Now restart iptables for the changes to take effect:

 

service iptables restart

 

Edited by srhmike
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  271
  • Topics Per Day:  0.08
  • Content Count:  791
  • Reputation:   20
  • Joined:  11/21/15
  • Last Seen:  

but im doing the right process for apache?

 

19 hours ago, srhmike said:

Probably has something to do with this:

http://superuser.com/questions/502723/centos-6-iptables-preventing-web-access-via-port-80

https://www.zerostopbits.com/how-to-install-apache-mysql-and-php-on-centos-6-7/

Or for an easier answer:


Chances are, you’re also going to need to open up port 80 on the iptables firewall. To do that, we need to do the following:

 

nano /etc/sysconfig/iptables

 

Find the following line:

 

-A INPUT -i lo -j ACCEPT

 

And add the below line immediately underneath:

 

-A INPUT -m tcp -p tcp --dport 80 -j ACCEPT

 

Hit CTRL-O to save, and CTRL-X to close the configuration file.

 

Now restart iptables for the changes to take effect:

 

service iptables restart

ill try this thanks in advance

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  261
  • Reputation:   53
  • Joined:  11/11/16
  • Last Seen:  

If you try whats in the code box, youll have to install nano, the 2nd link explains it.  And yes, I think its just a firewall issue. "I think"

Edited by srhmike
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...