Skip to main content

How do I remove a duplicate IP virtual host from httpd.conf?

Comments

6 comments

  • cPanelMichael
    Hello :) You can try rebuilding the Apache configuration file via: /scripts/rebuildhttpdconf
    If the issue persists, could you check to see if any third-party applications are installed (e.g. Nginx, LiteSpeed) that could be altering the Apache configuration after you modify it? Thank you.
    0
  • gareth.star
    Hi :) Unfortunately rebuilding the file didn't work. It displayed the following: info [rebuildhttpdconf] Missing owner for domain server.example.com, force lookup to root info [rebuildhttpdconf] Domain ownership conflict detected for example.com, users nobody, example Built /usr/local/apache/conf/httpd.conf OK
    While I would like to fix both of those messages, I think it's the second that is causing the problem. I don't think I'm running anything that would interfere with the conf files... well, not that I can think of. Thanks for the quick reply!
    0
  • cPanelKenneth
    I'm guessing server.example.com is the server hostname. Is that correct? How are you wanting to handle requests to the server hostname? If it's a matter of changing the IP address for the server hostname VirtualHost, then you can do that in 'Basic cPanel & WHM Setup' within WHM.
    0
  • gareth.star
    Yes, server.example.com is the hostname. If possible, I'd like requests to the hostname to point to the site as well. ie. server.example.com should show the same content as example.com The IP address in "Basic cPanel & WHM Setup" is already set to the IP address of the server. Thanks for the reply! :)
    0
  • cPanelMichael
    You should not configure your hostname as an account on the server or as a domain name associated with an account. This is not supported, and can result in Apache configuration problems. You could use a separate IP address for the account if you want it's content to load on that IP address. Or, you can manually modify the Apache configuration file, positing the VirtualHost for the account as the first entry for the IP address. Documentation on how to preserve changes to the httpd.conf file can be found at: Apache Configuration Changes Thank you.
    0
  • gareth.star
    I don't have the hostname as an account. I was just saying that it would be nice if the hostname URL could be resolved too, but it's not a big deal if it doesn't. My concern still lies with the IP address URL. I'll look at the link given. Thanks again for the help :)
    0

Please sign in to leave a comment.