Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a Windows (IIS) software engineer, but recently I've been thrown into a Linux server admin role until we can find someone to fill the position. I am not ashamed to admit I have no idea what I am doing.

Currently the problem I am trying to solve is that the server is only responding to https requests. However, we need it to respond to standard http requests as well.

We don't really have anything that needs to stay secure on its way to the requester.

I am running redhat linux with a bash shell.

If anyone could tell me how to enable http requests I would really appreciate it!

Please make sure your response is fairly step by step as I have minimal command line experience :/

share|improve this question
I am a Windows (IIS) software engineer, but recently I've been thrown into a Linux server admin role -- Your username is perfect! LOL – Aaron Copley Oct 4 '12 at 14:55
check if ipv4 is listening to all ports. run command netstat -lpt and post output – sharif Oct 4 '12 at 15:43
Do you know if the box is running SELinux? – ProfessionalAmateur Oct 4 '12 at 15:49
First, please clarify what "not responding" means. Is the connection refused, timing out, blank page, something else? Then you can begin to determine why it is happening. – Michael Hampton Oct 4 '12 at 15:52
Since you are running Red Hat I would suggest looking into the Red Hat knowledgebase if your subscription is still valid. In addition you may have access to telephone support from Red Hat where you will speak to someone who knows Linux. – Red Tux Oct 4 '12 at 16:12
up vote 2 down vote accepted

If your system is RHEL 6 then

iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT

should open the port for you.

If your system is RHEL 5 then

iptables -I  RH-Firewall-1-INPUT -p tcp -m tcp --dport 80 -j ACCEPT

would be the normal way to do it.

Either way if once it's working then

service iptables-save

will save the current firewall state to /etc/sysconfig/iptables

share|improve this answer
completes successfully, but still does not connect when I try to access a page via http... maybe this is an app problem? – wtfcoder Oct 4 '12 at 16:57
@wtcoder: what solved the problem - this doesn't seem like it did – Iain Oct 5 '12 at 13:50
it didn't; but I am convinced the problem is with the app at this point. Your command line worked for the question I asked... when I hit the site with http it just switches to https; it's when I hit the deeper pages that this problem occurs. – wtfcoder Oct 5 '12 at 13:58
@wtcoder: Ah, right - you probably have some rewriting going on in one of your configuration files in /etc/httpd... take a look at to see what you're looking for – Iain Oct 5 '12 at 14:01
I don't think this is occuring in apache because it is not happening on all the pages, if it was it would do it for all pages and I would have no troubles :) In I can do this: if (!Request.IsSecure) throw new ErrorException(); I suspect something thign similar is happening in this app. My company bought a social engine running on linux thing and as the most technical person they just threw it in my lap hahaha Still have a lot to figure out – wtfcoder Oct 5 '12 at 14:09

Also, as a non-root user, you cannot listen on port 80. If you wish to have your services listen on port 80, you will have to relay traffic:

$ sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8080
$ sudo iptables -t nat -I OUTPUT -p tcp --dport 80 -j REDIRECT --to-ports 8080
share|improve this answer
You assume that the webserver is Apache. – symcbean Oct 4 '12 at 16:04
hah! woops! let me edit that part out. Thanks! – Jason Huntley Oct 4 '12 at 16:08
The webserver is apache – wtfcoder Oct 4 '12 at 16:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.