jstayton

Member
Sep 22, 2001
10
0
301
Does anyone else have the problem of /~ not working? For example, when I try accessing http://ipaddress/~username or http://servername.com/~username I get a 404 error. I was going to submit a bug report, but this is only happening with this one server. My other servers with CPanel work fine.

Red Hat 7.2 with the latest version of CPanel (4.8.0-16).

Thanks for any help.
 

hst

Well-Known Member
Feb 24, 2002
111
0
316
Disable suexe feature

If you disable the suexe feature with whm it will work great. suexe causes all kinds of problems like this.
 

kwimberl

Well-Known Member
Aug 13, 2001
123
0
316
I'm not sure I agree with you there. We runs many servers with suexec and this is NOT a problem.
 

TRAIN YARD SOFTWARE

Well-Known Member
Dec 20, 2001
222
0
316
suExec has allways been turned on since day one. it is working for us.

domain/~user works fine


-Ed
TYS
 

jstayton

Member
Sep 22, 2001
10
0
301
Are you saying that suExec may be the reason why /~ no longer works? I'm not going to enable it until I get a definite answer, as it would require various adjustments (log files, etc..).
 

hst

Well-Known Member
Feb 24, 2002
111
0
316
It worked for us

Disabling it worked for us. I guess I am assuming that your using http://serverip/~username/ or http://serverdomain.com/~username/
to access the site before it propogates to view it in the browser. If you are trying to get to Cpanel you need to use http://serverip/cpanel/ or http://serverdomain/cpanel/ and then put in the username and password. To load a site FTP just put in the server IP and then the username and password. We are also using Linux 7.2 and whm 4.8
 

itf

Well-Known Member
May 9, 2002
620
0
316
A Directive in httpd.conf

There is a Directive in /etc/httpd.conf that could be configured to disable /~username, it’s called UserDir

Resolution:
In /etc/httpd.conf Modify UserDir part for best suit to your need, the default that allows /~username is this:

#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
&IfModule mod_userdir.c&
UserDir public_html
&/IfModule&


Also If you installed Nick’s “mod_bwprotect.c”; remove it (F.Y.I Nick wrote this module to protect the bandwidth but it’s not in original CPanel, and requires manual installation)

More Details about UserDir Directive

UserDir is very useful to save your bandwidth; Using http://anotherdomain.com/~myusername instead of http://mydomain.com/~myusername will spend bandwidth of anotherdomain.com it means one user can abuse other’s or machine’s bandwidth.

To disable UserDir

In /etc/httpd.conf put this line:

UserDir disabled

Disabling UserDir has some disadvantages:
1) If you offer Name Based hosting and domain propagation period hasn’t been finished User can’t access to his/her site
2) Shared SSL can not be implemented as https://shared-ssl-domain.com/~username

To allow a few users to have UserDir directories, but not anyone else, use the following:

In /etc/httpd.conf:

UserDir disabled
UserDir enabled user1 user2 user3

To allow most users to have UserDir directories, but deny this to a few, use the following:

In /etc/httpd.conf:

UserDir enabled
UserDir disabled user4 user5 user6
 

jstayton

Member
Sep 22, 2001
10
0
301
Thanks for the information [i:bb0c98db21]hst[/i:bb0c98db21] and [i:bb0c98db21]itf[/i:bb0c98db21].

After examining the system's httpd.conf file, it appears UserDir is setup correctly:

[quote:bb0c98db21]#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
&IfModule mod_userdir.c&
UserDir public_html
&/IfModule&[/quote:bb0c98db21]

Any other suggestions?
 

itf

Well-Known Member
May 9, 2002
620
0
316
Slash

Do you use like this?
http://domain.com/~username/

or

http://IP-address/~username/


I think you forget to use the end slash
 

itf

Well-Known Member
May 9, 2002
620
0
316
Slash

[quote:d1e8842996][i:d1e8842996]Originally posted by jstayton[/i:d1e8842996]

Does anyone else have the problem of /~ not working? For example, when I try accessing http://ipaddress/~username or http://servername.com/~username I get a 404 error. I was going to submit a bug report, but this is only happening with this one server. My other servers with CPanel work fine.

Red Hat 7.2 with the latest version of CPanel (4.8.0-16).

Thanks for any help.[/quote:d1e8842996]

Use like this

http://domain.com/~username/

or

http://IP-address/~username/
 

jstayton

Member
Sep 22, 2001
10
0
301
Ah, so easy! :) Thanks guys, but I have another question related to this. Should I be able to access any account with http://www.anydomainontheserver.com/~anyaccount/? Or does it only work with the main account/IP? Thanks.
 

itf

Well-Known Member
May 9, 2002
620
0
316
YES

[quote:5ec3dff9f4][i:5ec3dff9f4]Originally posted by jstayton[/i:5ec3dff9f4]

Ah, so easy! :) Thanks guys, but I have another question related to this. Should I be able to access any account with http://www.anydomainontheserver.com/~anyaccount/? Or does it only work with the main account/IP? Thanks.[/quote:5ec3dff9f4]

YES ;) that's working for any domains on a same server , Read my above post about &a directive in httpd.conf&

UserDir is very useful to save your bandwidth; Using http://anotherdomain.com/~myusername/ instead of http://mydomain.com/~myusername/ will spend bandwidth of anotherdomain.com it means one user can abuse other’s or machine’s bandwidth.
 

jstayton

Member
Sep 22, 2001
10
0
301
Thanks for the help [i:d6ef166495]itf[/i:d6ef166495]! But it seems you can't use /~username/ with ANY domain on the machine in question (besides the main domain/IP). Odd, eh? Normally I wouldn't complain about this, as it would stop people from using other account's bandwidth. But I have an account setup with SSL, and the client wants to allow his other accounts to use the certificate using the /~username/ feature. But it doesn't work.

Hmmm...
 

itf

Well-Known Member
May 9, 2002
620
0
316
[quote:fc3dc2eb92][i:fc3dc2eb92]Originally posted by jstayton[/i:fc3dc2eb92]

Thanks for the help [i:fc3dc2eb92]itf[/i:fc3dc2eb92]! But it seems you can't use /~username/ with ANY domain on the machine in question (besides the main domain/IP). Odd, eh? Normally I wouldn't complain about this, as it would stop people from using other account's bandwidth. But I have an account setup with SSL, and the client wants to allow his other accounts to use the certificate using the /~username/ feature. But it doesn't work.

Hmmm...[/quote:fc3dc2eb92]

If you read my UserDir ( &a directive in httpd.conf& ) post you will find out that I wrote about Name based accounts not IP based, to solve your SSL problem Create an IP based account with SSL installed and other accounts should be name based over that account’s IP. (Manual modifications are necessary)

For multiple IP based accounts you'll need wildcard certificate refer to Thawte.com for more details.
 

jstayton

Member
Sep 22, 2001
10
0
301
Thanks! This is really weird... UserDir works with every account on the server, except this one, which I'm sure isn't &disabled& by UserDir. Any ideas?
 

itf

Well-Known Member
May 9, 2002
620
0
316
[quote:331b677812][i:331b677812]Originally posted by jstayton[/i:331b677812]

Thanks! This is really weird... UserDir works with every account on the server, except this one, which I'm sure isn't &disabled& by UserDir. Any ideas?[/quote:331b677812]

Check the username and make sure you type it correctly, and if you got error discuss more about that account here.
 

jstayton

Member
Sep 22, 2001
10
0
301
The account in question (username &pc&) is the reason I started this thread. They're trying to access their account through our secure server (https://secure.pcpshosting.com). But, it gives a 404 error. Take for example the following...

https://secure.pcpshosting.com/~justinst/ works fine.

https://secure.pcpshosting.com/~pc/ doesn't work. (Their domain account works fine, so it's not that.)

This &pc& account is the only account to my knowledge that gives a 404 errors.
 

itf

Well-Known Member
May 9, 2002
620
0
316
[quote:0bcdc978d8][i:0bcdc978d8]Originally posted by jstayton[/i:0bcdc978d8]

The account in question (username &pc&) is the reason I started this thread. They're trying to access their account through our secure server (https://secure.pcpshosting.com). But, it gives a 404 error. Take for example the following...

https://secure.pcpshosting.com/~justinst/ works fine.

https://secure.pcpshosting.com/~pc/ doesn't work. (Their domain account works fine, so it's not that.)

This &pc& account is the only account to my knowledge that gives a 404 errors.[/quote:0bcdc978d8]

Q. Is that &pc& user account working with your server address? like this:
http://server.domain.com/~pc/
 

Yogesh

Registered
Dec 13, 2003
2
0
151
India
Please help

Thanks for above help.
But I have checked all above settings still the problem persists. "I cannot access domain using username".
can anyone give me solution for this problem ?.
( I have also compiled apache.) :confused: