Help fixing apache error

Status
This thread has been locked.

RazorStatic

Well-Known Member
Premium
Feedback score
4
Posts
223
Reactions
57
Resources
0
Hello fellow friends and members of MCM! I am in need of help to fix a apache error on my Centos 6.8 VPS Server. I installed apache via "sudo yum install httpd" then did "sudo service httpd start" and it didn't show any errors but when i try to connect to it on my browser it doesnt let me connect to it. If you know how to fix it add me on skype please :) angel.perez284.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

rippr

Software Engineer
Premium
Feedback score
4
Posts
303
Reactions
117
Resources
0

Eriq

Feedback score
0
Posts
2
Reactions
2
Resources
0
Why not just iptables -F the CentOS firewall that's default.. It's not like it does anyone any good anyways.
 

Plexiate

Premium
Feedback score
0
Posts
136
Reactions
72
Resources
0
Hello there Aloxic,

sudo yum install httpd mod_ssl

you must start it manually.
sudo /usr/sbin/apachectl start

You should get a message like this:
" Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName"

Open the main apache config
sudo nano /etc/httpd/conf/httpd.conf (If you don't have nano yet do 'yum install nano' )

Toward the end of the file, locate the section that starts with ServerName and gives an example.
'#ServerName www.example.com:80'
Enter a name for your website. (Domain)

Then just restart
sudo /usr/sbin/apachectl restart

Now on to opening that port!
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT

Then do this command to actually save what you've done
sudo service iptables save

Another important thing is actually starting it when the server is rebooted.
So, here's what you need to do.
sudo /sbin/chkconfig httpd on

We also need php, and other important stuff.
This should be all that you would have to do.

sudo yum install php php-mysql php-devel php-gd php-pecl-memcache php-pspell php-snmp php-xmlrpc php-xml

And finally, last restart of apache here.
sudo /usr/sbin/apachectl restart

Now that you've done this, assuming it's done correctly, whenever you go to your website (Domain.com) or ip (numbers) then you should be able to see the apache default web page.
Personally I do all my stuff on Ubuntu, and have not used CentOS in quite some time.

Anyways, let me know if it doesn't work and I'll see what I can come up with to help you get this up :)

- Plexiate
 
Status
This thread has been locked.
Top