Sorry for the potentially poorly worded subject. What I'm trying to do is send requests for userdirs (~/something) to a "catch all" location on the filesystem that uses PHP.
So, the site's root is, for example, /var/www/site.com/ and I'd like to point requests for /~(.*) to /var/www/error/, which contains PHP.
I've kind of had it working using a few things, but nothing perfect, and certainly not clean.
So /var/www/error/ will have PHP files, css, etc.
When I have gotten it to work, I can't seem to get the paths in the various PHP or HTML documents to be correct. E.g. rather than a relative "/css/file.css", it tries to look for "/var/www/error/~user/css/file.css".
For a location match, I'm currently using: location ~ ^/~(.*)$ { }. Maybe that's not perfect, but really, I need anything from a userdir to go back to this error page (e.g. /~user/my_site/file.html), with PHP support.
I'd post what I have for config here, but I don't really have anything - I've just tried various combinations of using "root", "alias" and "rewrite" to accomplish this.
Any insight is greatly appreciated.