I'm wanting to limit access to several things like PHPMyAdmin to users who are logged in and using SOCKS. To do that I'd like to make a virtual host in Apache. I'm guessing that the basic steps are to setup a vhost as normal and then put an entry in the server's hosts to point that domain home, but I'm unsure as to how to restrict the actual vhost to such users. Pretty typical Ubuntu server, LAMP stack, installed on a VPS. Having removed some of the unimportant things, I've been setting up VHosts using:
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DirectoryIndex index.html index.php
DocumentRoot /home/user/public_html/example.com/public
</VirtualHost>
Just to be clear, I'm ideally not looking to just limit the IPs a user can be from unless my desired method is more or less impossible to do.