Apache 2.2 on Fedora Core 5
Me an some friends took a new server two days back. We threw in Xen and made four guests. I being in one of the guests which runs Fedora Core 5. I had to instal...

Me an some friends took a new server two days back. We threw in Xen and made four guests. I being in one of the guests which runs Fedora Core 5. I had to install Apache, which was pretty easy with yum. Just
yum install httpd
I started Apache using apachectl, and it seemed like all was OK, but I was not somehow able to view anything when I typed my server’s IP in the browser from my home computer. Yet if I do a “telnet localhost 80” and “GET /” on the server itself ( I was logged in through SSH ), then I could view the HTML thrown at me by Apache. After Googling about it I found that port 80 (http) might be blocked by default. I found some help and dropped the following line to /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dport 80 ACCEPT
Wow… I could see the default Fedora welcome page now.
Now it was time to change my DocumentRoot to someplace else and also add Name based Virtual Hosts. When I changed my main DocumentRoot, Apache simply started throwing Forbidded errors. That was weird. It works with DocumentRoot set to /var/www/html but doesnt work when it is set to /srv/htdocs/
Now I did chmod 0755 -R /srv/htdocs, but it didnt help. I again assumed someone else was to be blamed. So a second round of Googling and I found this:
chcon -t httpd_sys_content_t -R /srv/htdocs/
That simply solved my problem again.
(Note: you might need to repeat the above command for you logs and cgi-bin folders, if they are not the default ones).
So it was an SELinux issue this time. Now most of my Apache 2.2 / Fedora Core 5 issues are fixed. Yay!!!
Software engineer and entrepreneur, 16+ years at fast-paced startups across the US, Canada, Germany and India.
Hook this up to your favourite commenting platform — Giscus, Disqus, or your own.
Continue reading
Machine Learning, AI, Data Science in simple terms
Hey folks, it has been a while since I posted. I was in a peer group discussing some of these terms recently and then a friend, who was writing a post to demyst...
Continuous Improvement for teams
Introduction Are you chasing deadlines? Finding yourself looking at the Monday to Friday cycle every week and feeling like sheep in an economic system where peo...
Frontend Driven Development
I have primarily been a backend web developer, started out with PHP around 2005 and then moving to Python in 2011. I have worked with a lot of JavaScript, mostl...