Apache UserDir instead of Virtualmin's Preview Website link? (errors with userdir)

10 posts / 0 new
Last post
#1 Sun, 01/29/2012 - 09:00
laurenced

Apache UserDir instead of Virtualmin's Preview Website link? (errors with userdir)

Hi all

I've discovered that the problem in my previous post was most likely because I was navigating to the virtual host using Apache's Userdir mod rather than Virtualmin's Preview Website link. I've since reinstalled with CentOS and done some digging, and that seems to be where the problem lies.

When I use userdir, I get these errors in /var/log/httpd/error_log:

[Sun Jan 29 13:30:28 2012] [warn] [client 1.2.3.4] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server, referer: http://ksxxx.kimsufi.com/~plastikwrap/apc.php
[Sun Jan 29 13:30:28 2012] [error] [client 1.2.3.4] Premature end of script headers: apc.php, referer: http://ksxxx.kimsufi.com/~plastikwrap/apc.php

If I use the Virtualmin Preview Website link (https://ksxxx.kimsufi.com:10000/virtual-server/link.cgi/1.2.3.4/http://w...), the errors aren't generated, and PHP runs fine.

The problem is that these URLs are difficult to remember. Userdir creates a much simpler way to temporarily access a virtual host.

Does anyone know what the problem with userdir is here and how to fix it?

Many thanks :)

Sun, 01/29/2012 - 09:36
laurenced

EDIT: i haven't fixed it :(

Sun, 01/29/2012 - 09:35
helpmin

Virtualmin (that is Apache) doesn't recommend this, because of security issues. You should use aliases instead (works even better)

See also

http://www.virtualmin.com/documentation/web/faq

Sun, 01/29/2012 - 15:32 (Reply to #3)
laurenced

THanks, that's good to know.

Is it possible to create the alias under the fully qualified server name (ksxxx.kimsufi.com)? This isn't a 'proper' domain so I'm not sure. I tried entering it in the Virtual Server Creation screen on the default server template (so it would be http://website.ksxxx.kimsufi.com) but it didn't seem to work.

Sun, 01/29/2012 - 15:56
helpmin

I don't think it would work, because you don't own the domain kimsufi.com, right?

But you could use a domain you own.

Sun, 01/29/2012 - 16:04 (Reply to #5)
laurenced

Ah I understand, it needs to be a proper domain, so http://ksxxx.kimsufi.com/username isn't possible with aliases?

Sun, 01/29/2012 - 16:09
helpmin

Do you own ksxxx.kimsufi.com and able change the DNS entries (like you would if you used your own domain)?

Sun, 01/29/2012 - 16:14 (Reply to #7)
laurenced

No I don't own kimsufi.com (it's the ISP's domain); ksxxx.kimsufi.com is just the address of my server (xxx is a number, other people with the same type of server have other numbers).

Sun, 01/29/2012 - 16:48
helpmin

Not sure about this setup. But why don't you just get a domain? Or you have one already for your website/ hosting business? then create a virtual server for it and use it for all your aliases?

Mon, 01/30/2012 - 02:12 (Reply to #9)
laurenced

Yep I can do that no problem, was just wondering :)

Topic locked