Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I add Alias and Directory directives without restarting Apache

Status
Not open for further replies.

Tore

Technical User
May 18, 2001
29
NO
Hi.

Have installed Apache 1.3.

Have a dynamic site where users can become members (either trial or full member) by paying online.
After I receive the payment IPN-notification from PayPal I create some stuff automatically in my MySql database using PHP4.

Have now tried to figure out how Apache works. Looks good. But for my web-application to be good I should be able to make my members site active without having to restart Apache.

Each member will have their site located here.
either on D disk or on E disk. And not in Apache RootDir!
d:/members/memberNameX
e:/members/memberNameY

When I'm testing this on apache now I'm adding lines in the
httpd.conf file: like this:

Alias /memberx "d:/members/memberx"
<Directory &quot;d:/members/memberx&quot;>
Options Indexes FollowSymLinks ExecCGI
ScriptInterpreterSource registry
AllowOverride None
Order allow,deny
Allow from all
</Directory>

And eventually add Virtual Name based hosts the same way..

My question is this:
Can I add and hopefully remove entries like this to apache dynamically without having to restart apache to make the new URL work?

It would be very bad if I had to restart apache for every new member, at least for every new trial member...

If I can make the nessesary changes to apache using PHP4 that would be great. If so.. how can I do that.

Have read some about LoadModule directive but I do not know if this is the thing to use here or eventually how to implement it.

In apache Manual-Configuration files at the beginning I found these lines, but does not understand how to do this... :
**********************************
New with Apache 1.3.13 is a feature where if any configuration file is actually a directory, Apache will enter that directory and parse any files (and subdirectories) found there as configuration files. One possible use for this would be to add VirtualHosts by creating small configuration files for each host, and placing them in such a configuration directory. Thus, you can add or remove VirtualHosts without editing any files at all, simply adding or deleting them. This makes automating such processes much easier.
******************************
If you also could translate that to a working example it would be nice.....


Tore

 
Hi Daniel and thanks for the tips.

It would be good for me if I wanted to have all my members &quot;sites&quot; below the root directory.

The examples in the document you refered to have all their &quot;sites&quot; in apaches root directory... And I cannot figure out how to do it the way I want.....

However, I will have my members sites in either
d:/members/ or
e:/members/ directories and maybe laiter
f:/members/

*************************
I would like my customers to be able to use at least one way to access their site and if possible two ways:
Way one: Let say I have the URL: Then my member should be able to access his site by entering this URL:
NOTE! without the tilde (~)
and/or

(the first URL and/or second URL above should get documents from i.e. d:/members/membername directory
or from i.e. e:/members/membername directory
!! (or from another disk that I may add laiter)

NOTICE different disks.....!!!!! But I would like to have
say... houndreds of members on one directory above....
************************************

My root dir in apache could be like this:
c:/
I would like to be able to add all my new sites (new members) without having to restart the .conf file.

But still be able to create virtual named hosts whenever I get a new member....
I would probably have to add
Alias /membername d:/members/membername
as well

Any other suggestions workarounds ....

Tore
 
You would probably have to rewrite the source for Apache to do what you want.

//Daniel
 
What the big boys do is set up for mass vhosting. This way you just have to create a directory for that member such as membername.yourdomain.com. Your only other option is as was suggested earlier, using the UserDir. Those are the only two ways I know of to add a website without having to restart apache.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top