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.

Website preview is not working

Discussion in 'General Discussion' started by Raz Sofer, Feb 17, 2017.

Tags:
  1. Raz Sofer

    Raz Sofer Registered

    Joined:
    Feb 17, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    Hello. I bought a VPS server today from OVH with a cPanel license, I managed to configure everything except accessing the website preview (The website is still under development, so I don't have a domain yet.). When I type "http://ip/~username" I get an Error 404.
    The website's files does exist in the "public_html" folder.

    Oh - and I do have WHM access and SSH as well.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  3. Raz Sofer

    Raz Sofer Registered

    Joined:
    Feb 17, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    Thank you for the quick reply!
    When I try to enable the option, I get a warning:
    "Web server processes on this system currently run as the user. For security reasons, mod_userdir is disabled in this case. Consequently, no changes you make in this interface will take effect until mod_userdir is enabled. To use mod_userdir, you must disable mod_ruid2 and mpm_itk and recompile EasyApache."
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  5. Raz Sofer

    Raz Sofer Registered

    Joined:
    Feb 17, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    Hello,
    I followed the steps in the tutorial you sent me and it didn't work.
    How do I disable Mod_ruid2 or mpm_itk?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The instructions should work unless you are using some type of custom network configuration.

    If you'd prefer to use Mod_Userdir, you can disable those modules in the build profile via EasyApache. To run EasyApache, use WHM's EasyApache 4 interface (WHM Home >> Software >> EasyApache 4).

    Thank you.
     
  7. Raz Sofer

    Raz Sofer Registered

    Joined:
    Feb 17, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Israel
    cPanel Access Level:
    Root Administrator
    Hello Michael.
    I have disabled Mod_ruid2, but mpm_itk was already disabled.
    The page is not showing an Error 404, but it does say "Not Supported", black title on white background.
    I think it's worth to mention that the website use wordpress, if it has any affection on the subject.
     
  8. sktest123

    sktest123 Well-Known Member

    Joined:
    Jan 31, 2017
    Messages:
    69
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    kochin
    cPanel Access Level:
    Root Administrator
    Just create a php info page and check whether it's executed , possibly it's php handler issue or mis configuration via Apache.
    You can also check whether the php files are exec within command line .
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The "Not Supported" message will occur when using the "CGI" handler with Apache Mod_Userdir. You will need to use another handler (e.g. suphp) if you want to utilize Apache Mod_Userdir. Documentation on selecting PHP handlers with EasyApache 4 is available at:

    Manage PHP Handlers in EasyApache 4 - EasyApache 4 - cPanel Documentation

    Thank you.
     
  10. cstech

    cstech Member

    Joined:
    Jun 1, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    bejaia
    cPanel Access Level:
    Root Administrator
    Hello All,

    I have the same issue? with OVH VPS! Is there an easy way to solve this?
    Thank you in advance
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    You'd need to use a different PHP handler, or consider an alternative to website previews like what's posted on this thread:

    [Tutorial] Editing your local hosts file to preview sites

    Thank you.
     
  12. cstech

    cstech Member

    Joined:
    Jun 1, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    bejaia
    cPanel Access Level:
    Root Administrator
    #12 cstech, Jun 1, 2017
    Last edited by a moderator: Jun 1, 2017
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The entry should use the domain name as opposed to the username. EX:

    Code:
    1.2.3.4 domain.tld
    Thank you.
     
  14. cstech

    cstech Member

    Joined:
    Jun 1, 2017
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    bejaia
    cPanel Access Level:
    Root Administrator
    Hello,
    I did what you said me and ping the IP adresse, unfortunately no new things happened!

    When I try to access http://1.2.3.4/~username or do a direct click on IP from, cPanel account information. I still get cpanel 404 not found page?
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,995
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Adding that line to your hosts file allows you to browse directly to the domain name in your web browser (e.g. domain.tld) rather than using the Mod_Userdir URL.

    Thank you.
     
Loading...

Share This Page