Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Enabling mod_userdir question

Discussion in 'EasyApache' started by TechStar1, Jan 7, 2018.

Tags:
  1. TechStar1

    TechStar1 Member

    Joined:
    Jan 5, 2018
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    cPanel Access Level:
    Website Owner
    Hi I'm being told that if I want to view my domains like this 166.**.80.**8/~fred/
    I need to do the below.

    I am using WHM
    • CENTOS 6.9
    • v66.0.34
    Any idea on how I can accomplish this?

    Thanks
    Code:
    mod_userdir is disabled
    Web server processes on this system currently run as the user. For security reasons, the system disabled mod_userdir. Any changes that you make in this interface will not take effect until you enable mod_userdir. To use mod_userdir, you must disable mod_ruid2, mod_itk, and mod_passenger and recompile EasyApache.
    
    
    Apache’s mod_userdir allows users to view their sites by entering a tilde (~) and their username as the URI on a specific host. For example [B][URL]http://test.cpanel.net/~fred/[/URL][/B] will bring up the user fred’s domain. The disadvantage of this feature is that any bandwidth usage used by this site will be put on the domain it is accessed under (in this case test.cpanel.net). mod_userdir protection prevents this from happening. You may however want to disable it on specific virtual hosts (generally shared ssl hosts).
    
     
    #1 TechStar1, Jan 7, 2018
    Last edited by a moderator: Jan 7, 2018
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,834
    Likes Received:
    85
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    You will have to disable the mod_ruid2, mod_itk, and mod_passenger apache module first to have this setting enabled. Execute EasyApache on your server and remove it..

    For more detailed information visit the below link:
    Apache mod_userdir Tweak - Version 68 Documentation - cPanel Documentation
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. TechStar1

    TechStar1 Member

    Joined:
    Jan 5, 2018
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    cPanel Access Level:
    Website Owner


    Yes I read that, does anyone know how this is done?

    Thanks
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Zardiw

    Zardiw Active Member

    Joined:
    Sep 22, 2017
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palm Springs
    cPanel Access Level:
    Root Administrator

    OK.....disabled what you said.......but now .php pages do not work.......says:

    "Not supported"

    Supposedly instead of doing the above, we should modify the etc/hosts file.

    HOWEVER the instructions for doing that are clear as Mud.

    Perchance could you provide a Detailed Example????

    z
     
  6. Zardiw

    Zardiw Active Member

    Joined:
    Sep 22, 2017
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palm Springs
    cPanel Access Level:
    Root Administrator
    Are you saying to modify OUR hosts file?????
     
  7. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,834
    Likes Received:
    85
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Yes, modify it on your computer that is what mentioned, so for your computer alone you can check how the domain looks when pointed to your server.. The link provided by Michael has detailed explanation on how to go about modifying it..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. Zardiw

    Zardiw Active Member

    Joined:
    Sep 22, 2017
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palm Springs
    cPanel Access Level:
    Root Administrator
    OK.....That's easy.....I modify my HOSTS file all the time.

    SO, I put this in my HOSTS File: 93.44.xxx.x xxx.com
    (not the real IP address)

    My website is actually example.com........but I used ---.com to put into my browser for testing the new server

    And that works. I put ---.com into the browser and it goes to that IP.

    However, if I just put the IP address in the browser it should do the same thing right?

    z
     
  10. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @Zardiw,

    The website contents will only load when browsing to the IP address when it's a dedicated IP address. If the IP address is configured as a shared IP, then it will display the default website page unless you've configured a specific virtual host as the first entry for that IP address in the Apache configuration file. There's a post with instructions on how to do that at:

    Prevent IP browsing as it does with the server's primary IP address

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice