apache - VPS IP redirects to website instead of the IP directory? CentOs 6

06
2014-04
  • Travis

    So before I started putting websites on my VPS, I could access the IP directly and it would access the html folder in the /var/www/ area. But ever since I placed websites on the VPS, I can no longer access that HTML folder, it goes to the first domain I have listed on the httpd.conf file.

    Is there a way I can make the IP its self look like a website in the httpd conf file? I tried to construct it like the other websites but httpd would stop working.

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    NIS failing on CentOS 6
  • jreid9001

    Solved: See bottom. tl;dr: enable network manager.

    I'm trying to set up a CentOS6 system to login using NIS. I've set up the NISDOMAIN and for the files like passwd to be on the NIS server in nsswitch.conf, but it fails to bind to the NIS server (it can ping it and SSH into it, so not a visibility issue), when booting or restarting ypbind, it waits for ages on Binding NIS service: ..... , then returns [ OK ], but doesn't actually bind as far as I can tell.

    When I try ypwhich, I get the following:

    ypwhich: Can't communicate with ypbind
    

    Looking around suggests that it might not be running when people have this problem, but it seems to be for me, at least as far as service and chkconfig show.

    rpcinfo -u localhost ypbind  
    

    returns the following:

    rpcinfo: RPC: Program not registered
    program 100007 is not available
    

    Edit: typo and slight clarification.

    Edit2: The NIS server is definitely specified, but it's acting as if it is not. When I do a

    service ypbind restart
    

    this is the output in /var/log/messages:

    Mar  7 13:29:27 foobar dbus: avc:  received policyload notice (seqno=6)
    Mar  7 13:29:27 foobar dbus: avc:  received policyload notice (seqno=6)
    Mar  7 13:29:27 foobar dbus: avc:  received policyload notice (seqno=6)
    Mar  7 13:29:27 foobar dbus: [system] Reloaded configuration
    Mar  7 13:29:37 foobar ypbind: NIS domain: FOO, NIS server:
    

    The server is definitely specified in yp.conf:

    domain FOO server 192.168.1.xxx
    

    Yet messages doesn't show this address.

    Edit3: Solution:
    It turns out ypbind will only work with network manager controlling the interface on CentOS6. Kind of a kludge, but it works - just enable network manager on the interface. When that's done, just restart ypbind and it works.


  • Related Answers
  • JoshP

    You may also want to check to see if you have Firewall enabled which will likely stop the communication between the NIS client and the NIS server.

    chkconfig --list | grep iptables
    

    Try the following:

    service iptables stop
    

    Then re-try your client binding.

    If that fixes the connectivity problem, then you can either turn off iptables (Firewall) or modify the rules appropriately.

  • arif-ali

    I had the same problem today, and for me it was the NetworkManager that was the problem

    i.e.

    service NetworkManager stop
    chkconfig NetworkManager off
    

    Then also make sure that each of the interfaces is not controlled by NetworkManager , and add NM_CONTROLLED=no, i.e. I ran the following command

    sed -i -e 's/\(^NM_CONTROLLED=\).*/\1no/g' /etc/sysconfig/network-scripts/ifcfg-*