Zardiw

Well-Known Member
Sep 22, 2017
75
3
8
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
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,259
313
Houston
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!
 

Zardiw

Well-Known Member
Sep 22, 2017
75
3
8
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
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,259
313
Houston
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!
 

Zardiw

Well-Known Member
Sep 22, 2017
75
3
8
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
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,259
313
Houston
HI @Zardiw

SO, what exactly do I put in my local HOSTS file so I don't have to use mod_userdir.
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
I've installed suPHP now..........but still getting 404 errors.....
You've installed it but have you set it as the handler?
 

Zardiw

Well-Known Member
Sep 22, 2017
75
3
8
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
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,259
313
Houston
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.
 

Zardiw

Well-Known Member
Sep 22, 2017
75
3
8
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
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,297
1,259
313
Houston
Also........mod_ruid2 is incompatiple with mod_suPHP apparently........will see if I can test the php scripts.
This is a known issue they are not compatible. mod_ruid2 is also not compatible with mod_userdir

1. Enable mod_ruid2 and disable mod_suPHP
2. Enable php56-php so I will be running under DSO, cause that's faster.
You will be able to do both of these - you don't need suPHP if you're not using userdir.

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


Thanks!