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] (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] 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/, 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 :slight_smile:

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

See also


EDIT: i haven’t fixed it :frowning:

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.

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.

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

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

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).

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?

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