I have a virtual machine running a number of websites.  All users have access these via the external IP address of the machine. I am running Debian Stable on this machine.I can access the machine via ssh and have organized it so I port forward my local 10080 port to localhost:80 so I can connect my browser to localhost port 10080/phpmyadmin and gain access to phpmyadmin.  My machine is on a 192.168.0.0/24 networkTrouble is, you can also access it via any of the external web sites - because Debian has placed it in the top level Apache config.I would like to limit access to only connections via the ssh port.  But there doesn't appear to be the equivalent of a listen directive for a directory.However there is Allow from IP_address. What IP address does apache think I connected on when I come over the ssh tunnel. 
Can I configure apache to limit access to a directory only from my ssh connection?
ssh;apache httpd
OK, this is relatively simple to solve.You access your server with ssh -L 5580:localhost:80 www.servername.tldand you access your phpmyadmin via http://localhost:5580/phpmyadmin/because Debian has placed itIf you would have M$, you can say this, but you have Debian, so you can change the defaults as you need. :-)However there is Allow from IP_address. What IP address does apache think I connected on when I come over the ssh tunnel. The same as you have already used: localhostSimplest solution here, you said it already# /etc/phpmyadmin/apache.conf Alias /phpmyadmin /usr/share/phpmyadmin<Directory /usr/share/phpmyadmin>  ...  AllowOverride None  Order deny,allow  Deny from all  Allow from 127.0.0.0/255.0.0.0 ::1/128</Directory>Another solution would be to listen on an additional port to have an exclusive access to phpmyadmin:Files to change: # /etc/apache2/ports.conf Listen localhost:8880and# /etc/phpmyadmin/apache.conf <VirtualHost *:8880>  ServerName localhost  Alias /phpmyadmin /usr/share/phpmyadmin  <Directory /usr/share/phpmyadmin>     ...     Allow from 127.0.0.0/255.0.0.0 ::1/128  </Directory>    </VirtualHost>Eventually apache2ctl configtest apache2ctl restartThe redirection command ssh -L 5580:localhost:8880 www.servername.tldand connect to http://localhost:5580/phpmyadmin/