apache virtual host question

Fark_Maniac

2[H]4U
Joined
Feb 21, 2002
Messages
2,438
So here's my problem. I'm working on a database driven section of a webpage that resides on a co-located server. To do minor edits to the data, I plan on writing some simple php. To get away from authentication to keep unwanted people out, I'm going to host the edit files on my web server that resides within my home network. My web server also hosts web pages that are specified within the VirtualHost section.

What I want to do is something like:
Code:
<VirtualHost *:80>
	DocumentRoot c:/secureedit
	ServerName svr/edit
	<Directory "c:/secureedit">
		Options Indexes FollowSymLinks Includes ExecCGI
        	AllowOverride FileInfo
	      Order allow,deny
        	Allow from all
	</Directory>
</VirtualHost>

just to clarify, the default folder that 'svr' would normally resolve to does not have an "edit" folder...kinda like a virtual folder. "svr" is also the server name, so within the local network, it would present all folders in the root of the web server "document root". Server is running Apache2. I thought there was a way to do this, but I cannot think of what it is called.

End goal is to have a virtual folder only accessible from within the local network. Any thoughts?
 
The ServerName should be a fully qualified domain name, www.hardocp.com is an example, not a directory.

If you want a directory to be accessible only from a certain network you should tweak the Allow from directive for that particular directory.
 
hmmm, let me rephrase that.

I want to type "http://svr/edit" into my address bar and apache, which would normally be hosted in c:/docroot, will grab the documents instead out of c:/secureedit.

I suppose the other way I could do this would be to add an entry into my HOSTS file as "secureedit" pointing to "svr"'s internal IP. then setting up a virtual host listening for "secureedit" requests and grab the files where I need them.
 
Back
Top