-1

when I'm trying to access my site it works fine with http://domain_name/ but when I'm trying to use it with http://ip/~username it goes to 404 page.

Do I need to do some additional settings in WHM or in cPanel or activate something ?

Is there any reason for it. Please let me know

I think something might related with mod_userdir but when I'm visiting that page in WHM it shows this :

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.

Thanks in advance

Mohit Bumb
  • 99
  • 1
  • 5

1 Answers1

0

You would need use Apache Module mod_userdir and configure Per-user web directories for your default virtual host to enable the /~username/ URLs.

On systems with multiple users, each user can be permitted to have a web site in their home directory using the UserDir directive. Visitors to a URL http://example.com/~username/ will get content out of the home directory of the user "username", out of the subdirectory specified by the UserDir directive.

Note that, by default, access to these directories is not enabled.

Is there any reason for it? Not unless you provide websites for your users not having an own domain name. For search engine optimization it's better to have a single canonical address for your site.

Esa Jokinen
  • 46,944
  • 3
  • 83
  • 129
  • Its saying : 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. – Mohit Bumb Dec 26 '18 at 13:23
  • It's saying... already everything you need to know. One reason less to worry about something you don't actually need. – Esa Jokinen Dec 26 '18 at 13:30
  • So for running with http://ip/~username should I disable mod_ruid2 and enable mod_userdir or there's any other way to directly run it with mod_ruid2 enabled ? – Mohit Bumb Dec 26 '18 at 13:35
  • They are not alternatives but for totally different purposes. Mod_ruid2 is a suexec module. Why you think you should have an `/~username` URL in the first place? – Esa Jokinen Dec 26 '18 at 13:39
  • because I don't wanna share domain till development is going I need to access via ip – Mohit Bumb Dec 26 '18 at 13:46
  • 1
    Use some `development.example.com` sub domain instead. – Esa Jokinen Dec 26 '18 at 13:56