mod_userdir not supported to preview website without domain name

psytanium

Well-Known Member
Jun 6, 2014
275
13
68
Lebanon
cPanel Access Level
Root Administrator
Hello,

If I try to preview the website from the url xxx.xxx.xxx.xxx/~username I get Not Found screen. When I enabled the mod_userdir. I get Not Support message.
What could be the problem ? and what else can I try other than modifying the host file ?

Thank you :)
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
5,447
697
313
cPanel Access Level
Root Administrator
Hey there! It sounds like you have may have a PHP handler conflict that is keeping the page from being displayed properly. Can you check the settings here and see if that is your issue?


If that doesn't help, just let me know and we can try something different.
 

psytanium

Well-Known Member
Jun 6, 2014
275
13
68
Lebanon
cPanel Access Level
Root Administrator
Hey there! It sounds like you have may have a PHP handler conflict that is keeping the page from being displayed properly. Can you check the settings here and see if that is your issue?


If that doesn't help, just let me know and we can try something different.
SuPHP or DSO is needed in order to runmod_userdir. But I only have CGI in the PHP handler. What do you suggest.. Thank you :))
 

psytanium

Well-Known Member
Jun 6, 2014
275
13
68
Lebanon
cPanel Access Level
Root Administrator
I managed to install SuPHP on Apache4.. now i can access the website, but how can i access the backend of my website ? it should be domain.com/admin
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
5,447
697
313
cPanel Access Level
Root Administrator
If you're seeing access issues after a switch to suPHP there are likely permissions problems. Can you run the following command to watch the Apache logs in real-time while you try and access the backend application?

Code:
tail -f /etc/apache2/logs/error_log
That will show you any errors being triggered in the web server that could cause this.
 

psytanium

Well-Known Member
Jun 6, 2014
275
13
68
Lebanon
cPanel Access Level
Root Administrator
If you're seeing access issues after a switch to suPHP there are likely permissions problems. Can you run the following command to watch the Apache logs in real-time while you try and access the backend application?

Code:
tail -f /etc/apache2/logs/error_log
That will show you any errors being triggered in the web server that could cause this.
No I mean what could be the URL to access the backend ? something like 1.2.3.4/~user/admin ? Where do i add /admin
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
5,447
697
313
cPanel Access Level
Root Administrator
The path would be the same as what it would normally be on the web as 1.2.3.4/~username points to the public_html directory for that account. So, if you had Wordpress installed that is normally at domain.com/wp-admin you can visit 1.2.3.4/~username/wp-admin and expect that to work.
 

psytanium

Well-Known Member
Jun 6, 2014
275
13
68
Lebanon
cPanel Access Level
Root Administrator
The path would be the same as what it would normally be on the web as 1.2.3.4/~username points to the public_html directory for that account. So, if you had Wordpress installed that is normally at domain.com/wp-admin you can visit 1.2.3.4/~username/wp-admin and expect that to work.
When I login to admin, it redirect me to domain.com/dashboard

But anyway, what is important, the website is broken, no css files loaded. Do you know some solutions ?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
5,447
697
313
cPanel Access Level
Root Administrator
It sounds like you're trying to preview the site before switching the DNS over to a new host. In that case, the mod_userdir links won't be helpful as it seems both your admin panel and the CSS files are using direct links, causing that redirection to happen.

It might be better to edit the hosts file on your local workstation to preview the site on the new IP address to see if that is working well. Details on how you can do that can be found here:

 

psytanium

Well-Known Member
Jun 6, 2014
275
13
68
Lebanon
cPanel Access Level
Root Administrator
It sounds like you're trying to preview the site before switching the DNS over to a new host. In that case, the mod_userdir links won't be helpful as it seems both your admin panel and the CSS files are using direct links, causing that redirection to happen.

It might be better to edit the hosts file on your local workstation to preview the site on the new IP address to see if that is working well. Details on how you can do that can be found here:

Editing the host file works well on my PC, but I don't know how to adjust tablets and mobiles for this. Is there any other ways ? thanks
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
5,447
697
313
cPanel Access Level
Root Administrator
I don't believe that's possible on an Android device without it being rooted, or iphones having to be jailbroken, so there isn't an easy way to go about this. If the site is working well with your PC test I would also expect it to work well on the mobile devices, but you may have to just change the IP and test it after that is live.
 
  • Like
Reactions: psytanium