Find the answer to your Linux question:
Results 1 to 8 of 8
I'm sorry if this has been asked elswhere, but I'm not really finding the answers. I have no idea what I am doing wrong. I have edited the httpd.conf file ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! bpickell's Avatar
    Join Date
    Jun 2006
    Posts
    8

    Apache only working on port 80


    I'm sorry if this has been asked elswhere, but I'm not really finding the answers.

    I have no idea what I am doing wrong. I have edited the httpd.conf file and if I change the port that it listens on to anything but port 80 the httpd service will not start. And I am also changing the port number next to servername as well.

    I am running apache 2.2 the version that shipped with Fedora FC5. I never had this problem while running the stand alone version of apache. Can't tell you how long it took just to figure out where they put apachectl.

    When I do apachectl restart, I don't receive any errors but the websie will not load, not even when navigating to http://localhost:##. Just get page cannot be displayed. If I change it back to 80, it will load everytime.

    Life would be so much easier if Verizon would just not block port 80 on fios. It wasn't blocked when I had dsl.

    Any ideas would be greatly apreciated. Thanks in advance.

  2. #2
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    If you aren't using NAT then you are going to have problems. HTTP by default uses port:80. As for starting the service, have you checked and double-checked listen.conf? I'm not sure where this is located in FC but on my SuSE box it is found within /etc/apache2. Try looking there, because your configuration is messed up which is quite obvious.

  3. #3
    Linux Newbie
    Join Date
    Dec 2004
    Location
    Portland, OR
    Posts
    123
    The firewall of course! as root,

    vi /etc/sysconfig/iptables;

    and add this line to the bottom:

    Code:
    -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport NNN ACCEPT
    where NNN is the port number you want to use.

  4. #4
    Just Joined! bpickell's Avatar
    Join Date
    Jun 2006
    Posts
    8
    I actually disabled the firewall temporarily to check to see if that is what the problem was. That was no help at all. Apache isn't starting. I noticed when I reboot the computer an error is popping up about can't bind to port 81. or something like that. It goes by so fast it's hard to read. I just noticed that one this morning.

  5. #5
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    If you missed the message, at the CLI, enter SU and password and type cat /var/log/messages and see what it says.

  6. #6
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    One last thing, have you disabled SE Linux?

  7. #7
    Just Joined! bpickell's Avatar
    Join Date
    Jun 2006
    Posts
    8
    Quote Originally Posted by gtmtnbiker98
    One last thing, have you disabled SE Linux?
    That was it... I disabled it and it started working. I would never have thought to disable the SE Linux, partly because I didn't know exactly what it was. Thanks for the help.

  8. #8
    Linux Newbie
    Join Date
    Dec 2004
    Location
    Portland, OR
    Posts
    123
    oh yea. normally all you have to do to satisfy selinux with apache is issue this to all your web files
    Code:
    chcon -t httpd_sys_content_t filename;
    "Change the selinux security context of filename to a web document."

    i still dont know how selinux really benefits anyone (after reading about it for hours), but it is easy to make it happy, anyway. And the NSA is pretty smart, I'll trust them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •