Forum Moderators: phranque
1) take at look at your httpd.conf file
for each of your virthosts you'll need to create a virtual host section like this:
<VirtualHost *>
ServerName www.webserver.com
DocumentRoot /Volumes/brugere/client/documents
<Directory "/Volumes/brugere/client/documents">
Options None
AllowOverride None
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ "/Volumes/brugere/client/cgi-bin/"
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
php_value include_path ".:/Volumes/brugere/client"
php_value session.cookie_domain "www.webserver.com"
php_value session.save_path "/Volumes/brugere/client/tmp"
php_value session.use_only_cookies "1"
ErrorLog "/Volumes/brugere/client/logs/error_log"
CustomLog "/Volumes/brugere/client/logs/referer_log" referer
CustomLog "/Volumes/brugere/client/logs/agent_log" agent
CustomLog "/Volumes/brugere/client/access_log" common
</VirtualHost>
you can keep a separate file for each of you clients by adding this line at the end of the httpd.conf file:
Include /private/etc/httpd/users
every file in that directory will be included and interpreted by apache
if you want to offer MySQL as well, create a mysql folder in the user account folder and make a symbolic link ( ln -s ) from the standard place where MySQL stores things.
lrwxrwxrwx 1 mysql mysql 56 Apr 28 22:00 client -> /Volumes/brugere/client/mysql
remember to set up a user account with mysql too for each of your clients to have MySQL access
almost *everything* can be defined on an account by account basis.
keep the main httpd.conf file as lean and mean as possible and move everything else into the individual user account files.
get hold of a good advanced book on apache and read the online manual.
the online php manual is also a good place to start.
you can download a complete pdf manual for MySql - highly recommended
mysql
- containing the client mysql database
- remember to set chown -R mysql:mysql
cgi-bin
- contains all the cgi programs for the client
- if you only want the person to use some specific cgi's
- set chown -R root:client ; chmod -R 755
documents
- contains the client web-site
php-includes
- for handling php include files that aren't accessible by directly accessing a URL
- useful for storing php macros for logging in to mysql
tmp
- for the php session files