Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-18-2004, 11:13 PM   #1
Registered: Aug 2002
Location: Friendsville, TN
Distribution: Fedora Core 2
Posts: 44

Rep: Reputation: 15
Virtual Host file structure question

SooperNoob here...

I need to know if what I want to do is (1) possible and (2) how to do it if it is.

I want to set up Apache to do Virtual Hosting on one hardware server, serving
more than 100 web sites. I want to allow the web site clients to have access
to updating their content as far as the text input goes, but I want to have my own
control over CSS, and templates for layout and presentation under my control
through a set of files and scripts that are kept separate from each Virtual Host's
Document Root structure.
How do I go about creating a file structure that can be referenced by the HTML
pages from inside the Virtual Hosts Document Root structure that Apache
serves to requesting browser clients which resides in a file structure not in
the Virtual Hosts Document Root? That is, when the HTML index.html page
is being served from VH Doc. Root, and it makes reference to somescript.php
or some other template file NOT under VH Doc. Root, how can the connection
be made to them? Where do you put it, and what directives do you put into
the Virtual Host container setup in httpd.conf to support that kind of referencing?

The idea here is that I have a lot of supporting files consisting of logic (scripting)
and formatting files (templates, CSS's, etc) that will be common to every
Virtual web host - so extensive that I do not want to fill up valuable disk space
replicating it in each and every Virtual Host's Doc. Root structure. So I want to
break out the common stuff and have it reside physically on disk only once and
be able to refer to it from within the scope of every Virtual server.
Essentially, I'm wanting to know if there is a way to
serve files outside of the DocumentRoot of each Virtual
Host. If so, how does it work.

I've probably been as clear as mud in stating my quest, but that's about as
good as I can make it now with my totally newbie and incomplete understanding
of Apache at this point.

Looking for lots of kind, patient help.

Old 09-18-2004, 11:40 PM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
One obvious suggestion is to put all the common stuff into one directory, and then make a symlink from each vhost webroot to the common directory. Then the site WWW pages will have to be made to refer to the common directory. It's kind of kludgy, but it should work.
Old 09-22-2004, 08:11 PM   #3
Registered: Aug 2002
Location: Friendsville, TN
Distribution: Fedora Core 2
Posts: 44

Original Poster
Rep: Reputation: 15
No, I'm sorry. That is not what I am after, but thanks for the attempt.

I want the users content - as far as his text and graphical
content to be isolated to his particular virtual Host Document Root. This, so that he may be granted access to do his own updates.

All the rest of the business of presentation style and format and behavior, I want in this separate file structure. It is to be common to many virtual hosts, and I want it separate, under control of me, the webmaster only.

The idea here is to serve many, many virtual hosts, providing them all with an infrastructure of formatting which does not have to be repeated in each Virtual Hosts Document Root and
keeping it off limits to unsophisticated users. I am actually after two separate file trees - the defacto one normally given to every Virtual Host created by the VirtualDocumentRoot directive and a separate one, not in any way tied to the former one, but accessible from one common separate file tree shared by all Virtual Hosts.

If there's any programming to be done, I want it in this separate file structure, accessible from every virtual host as far as serving their content, but inaccessible as far as their having modify privileges. This is both for safeguarding the integrity of these critical files and to save disk space by having it appear on disk only once.

Hope that clarifies a little. I'm not conversant enough with Apache and web servers enough to put it in technically correct language, I apologise. That's why I'm seeking the help of the more experienced.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 04:23 AM
File system/structure question ashley75 Linux - General 1 05-17-2005 09:02 PM
Apache virtual host question fredws Linux - Software 1 01-22-2004 12:12 PM
Apache: Virtual Host Config question rajanr Linux - Software 5 08-30-2003 12:41 PM
Apache Virtual Host Question fed007 Linux - Networking 6 12-02-2002 04:46 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration