The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Shared IP virtualhost question 404 error question

Discussion in 'General Discussion' started by knipper, Feb 10, 2010.

  1. knipper

    knipper Well-Known Member

    Joined:
    Sep 4, 2001
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Hi All,

    The other day while doing some testing I noticed I got an odd 404 error page if I tried to access a website via http://mysharedserverip/~username - When I went to the main shared IP... I got the apache has been installed correctly page. NOT the typical first website of the shared IP (usually the first entry in the http.conf virtualhost area)

    I created a new directory, placed the files I wanted to see then edited httpd.conf pointing the virtualhost to the new directoty. (It was aimed at apache docs at /usr/local/apache/htdocs) But even after restarting apache, I still went to the old directory.

    Then I worried about easyapache overwriting and wanted to make sure I didn't need to edit or create a custom .conf file instead.

    Anyone shed some light? :confused:

    Thanks! :D
     
  2. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    18
    Check whether mod_userdir protection is enabled.
    You can check that via WHM >> Main >> Security >> Security Center

    You seem to have done everything perfectly here. The server IP should pull up the first VirtualHost entry in the httpd.conf file. Tried restarting apache again and clearing your browser cache?
     
  3. knipper

    knipper Well-Known Member

    Joined:
    Sep 4, 2001
    Messages:
    107
    Likes Received:
    0
    Trophy Points:
    16
    Ok...

    InstaCarma_Tech,

    Thanks for the reply. I did have the mod_userdir_tweak checked. Which explains the 404 when trying to view a file. But also brings up a new question I'l post in a new thread.

    So I'm going to test a new directory again... but what would the best method to change httpd.conf so it doesn't get over-written? Is it safe to edit the entry directly, or do I need to create a custom file & reference it?

    Oh... and yes... I did restart apache & cleared the cache. Even tried a seperate browser.
     
Loading...

Share This Page