For Apache web server you will need to do the following
Go to the directory of your admin pages. For example opt/lampp/htdocs/iweb
Next create a file called .htaccess and then open it and add the following:
order deny,allow
deny from all
allow from 127.0.0.1
Change the IP address to that of your home computer.
Or, if you want to say, allow a connection from any machine within the LAN you could use this (my personal fav, so I can log in from any machine or device from within my own LAN):
order deny,allow
deny from all
allow from 10.0.0.0/255.255.0.0
of course adjusted for your own network (IP/SUBNET)
[With my example you can 'access' your admin site/pages from (say) a machine with the IP 10.0.0.10 or 10.0.50.1 or 10.0.128.64 etc...]
***************
So far I was able to locate this for the same concept as the one I use above for apache's httpd server, for tomcat:
<!-- allow only LAN IPs to connect to the manager webapp -->
<!-- contrary to the current Tomcat 5.5 documation the value for allow is not a regular expression -->
<!-- future versions may have to be specified as 192\.168\.1\.* -->
<Valve className="org.apache.catalina.valves.RemoteAddrValve"
allow="10.0.*.*" />
(add
Sweet, I do believe I have it all figured out now (how to set this for each 'webapp' too, so that some will be allowed LAN or WAN, and some will be LAN only). My next release/update will highly likely eliminate the redundant 2nd tomcat installation
:
To follow suit with allowing a connection from any PC/Machine/Device from within the LAN, this is the config I found works:
<Valve className="org.apache.catalina.valves.RemoteAddrValve" deny="*" allow="10.0.*.*" />
If you're looking to control each individual 'container' (like myself) then you would NOT want to add the above example to the context.xml located @ $CATALINA_HOME/conf/context.xml
(Because if you did add it to this one [the wrong one] the restrictions you make [like in this example: open to LAN only] then ALL webapps/containers will ONLY be accessible to the LAN)
To control individual 'containers' or 'webapps' you would add a config like my above example to:
$CATALINA_HOME/conf/[enginename]/[hostname]/[appDirectoryName].xml
OR to the webapp itself @
$CATALINA_HOME/webapps/[appName]/META-INF/context.xml