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!

mod_userdir getting 404 error

Discussion in 'General Discussion' started by Zardiw, Aug 3, 2018.

  1. Zardiw

    Zardiw Active Member

    Joined:
    Sep 22, 2017
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palm Springs
    cPanel Access Level:
    Root Administrator
    I'm trying to use mod_userdir ......disabled mod_ruid2 etc.....but am now getting a 404 error when going to:

    95.444.xx.xx/~siteusername

    Why is that?

    Also......there is no actual mod_userdir in Easy Apache 4 options list....so how is it enabled?

    And last.....the Apache mod_userdir Tweak settings are unclear to me.
    Does that just stop bandwidth stats from going to wrong user, or does that actually SET mod_userdir .....and what does the 'exclude' do?

    Thanks for any input on this.......

    z
     
    #1 Zardiw, Aug 3, 2018
    Last edited by a moderator: Aug 3, 2018
  2. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,212
    Likes Received:
    159
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @Zardiw

    Can you tell me which php handler you're using? It is a bit difficult to troubleshoot this issue without further information on the configuration. Do you have any errors in the apache error log when attempting to load a site using mod_userdir?


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Zardiw

    Zardiw Active Member

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

    I have only php56 installed........handler is ea-php56

    I did install suPHP, but it's not listed as an available handler.

    Also, PHP-FPM is off.

    Bottom Line on all this...

    Trying to move 2 sites to a new server.
    Both sites have a MySQL DB.......and a lot of PHP processing scripts.

    It's been a nightmare testing the sites on the new server, b4 I update the DNS.

    Cause with mod_userdir, supposedly you can't test PHP.......but I read using suPHP you CAN test it using mod_userdir.

    It's all very confusing.......lol........and I've been programming all my life..........

    I DID get it tested/working when one site had a dedicated IP.

    But now both sites are on the same IP as the server, cause one site has to access the DB of the other site, and I was concerned if that was gonna be a problem if they had different IPs.......sigh

    And now I've taken a giant step back......cause I can't reach either site.....lol

    z
     
  4. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,212
    Likes Received:
    159
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @Zardiw

    I would always recommend modifying your local hosts file over using mod_userdir for this purpose. If you don't know how to do this we have a guide here: Tutorial - Editing your local hosts file to preview sites

    If you must use mod_userdir for this purpose can you please go to WHN>>Software>>MultiPHP Manager -> PHP Handlers and tell me what is listed as being used currently?

    If SuPHP is not being used though you'd like to use it can you please go to WHM>>Software>>EasyApache4 Click customize on your current profile/Currently Installed packages, go to Apache Modules and select suPHP if it's not already selected.

    Once that's complete you should be able to set suPHP as the default handler for php 5.6. Please let me know if the issue persists once that's done.

    Thanks!
     
    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
    I did add this entry to my HOSTS file on my computer when one site was on a dedicated IP, and that worked fine:
    94.555.xx.xx ---.com

    So when I entered dda.com in my browser it went to the site and it all worked, tested, etc.

    But now I have that site and my other one on the server as shared......2 accounts.

    SO, what exactly do I put in my local HOSTS file so I don't have to use mod_userdir.

    I've installed suPHP now..........but still getting 404 errors.....

    We're not at php yet I don't think......lol
     
    #5 Zardiw, Aug 3, 2018
    Last edited by a moderator: Aug 3, 2018
  6. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,212
    Likes Received:
    159
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    HI @Zardiw

    You would use the shared IP address of the server - two sites can be directed to the same IP address without issue you'll just add an entry for each, including an entry for the www. domain. Something like the following would work in the event that I had several sites I wanted to test all at the same IP address:

    Code:
    192.168.1.95    test.com
    192.168.1.95    www.test.com
    192.168.1.95    anothertest.com
    192.168.1.95    www.anothertest.com
    192.168.1.95    3rdtest.com
    192.168.1.95    www.3rdtest.com
    You've installed it but have you set it as the handler?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Zardiw

    Zardiw Active Member

    Joined:
    Sep 22, 2017
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palm Springs
    cPanel Access Level:
    Root Administrator
    It WORKS now........added the IP / Domain to my HOSTS file and it's finding the site on the new server!

    Yes. suPHP is the handler for ea-php56.

    So now I don't need mod_userdir, correct?

    Maybe the suPHP handler had something to do with finding the site........

    Thank you for all your help!!!

    z
     
  8. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,212
    Likes Received:
    159
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @Zardiw

    Wonderful, I'm glad it's working. This is the best way to test the sites prior to changing their DNS. You do not need to use mod_userdir any longer for this purpose.

    My assumption was that you were most likely using CGI previously. SuPHP works best with mod_userdir.
     
    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
    Also........mod_ruid2 is incompatiple with mod_suPHP apparently........will see if I can test the php scripts.

    Once the DNS has propagated and the new server is live, will I be able to:

    1. Enable mod_ruid2 and disable mod_suPHP
    2. Enable php56-php so I will be running under DSO, cause that's faster.

    Is that correct?

    z
     
  10. Zardiw

    Zardiw Active Member

    Joined:
    Sep 22, 2017
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Palm Springs
    cPanel Access Level:
    Root Administrator
    How exactly is mod_userdir implemented/removed?

    I see nothing about that in EA 4

    z
     
  11. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,212
    Likes Received:
    159
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    This is a known issue they are not compatible. mod_ruid2 is also not compatible with mod_userdir

    You will be able to do both of these - you don't need suPHP if you're not using userdir.

    It's enabled/disabled through WHM>>Security Center>>Apache mod_userdir Tweak. This is the only place you can manage this.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. 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.....Thanks again......I thought the Apache mod_userdir Tweak was just a 'tweak' for it.......but maybe they go together or something.....
     
  13. cPanelLauren

    cPanelLauren Forums Analyst
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    2,212
    Likes Received:
    159
    Trophy Points:
    143
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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