- 论坛徽章:
- 0
|
我们的开发环境是在一台服务器上。程序员映射目录到自己的机器上。每个人在服务器上配置一个虚拟主机。通过设置hosts来访问。每来一位新同事就得添加samba目录。添加nginx虚拟主机。svn co代码。改config.php配置等一系列操作。每位员工调动时。需要把他在服务器上的目录以及配置删掉。。下面是一个脚本来做这些事情。。包括一个模块文件
/data/software/sh/template.conf- ############{{user}}############
- server {
- listen 80;
- server_name {user}.lava.cn;
- #charset koi8-r;
- access_log logs/{user}.lava.cn.access.log;
- error_log /data/weblog/{user}.lava.cn.error.log;
- location / {
- root /home/{user}/gamebox/htdocs;
- index index.php index.html index.htm;
- }
- # pass the PHP scripts to FastCGI server listening on 192.168.1.123:9000
- #
- location ~ \.php$ {
- root /home/{user}/gamebox/htdocs;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- fastcgi_param FILE_SCRIPTNAME $document_root$fastcgi_script_name;
- fastcgi_param PHP_VALUE "include_path=/home/{user}/gamebox/include:/usr/share/pear";
- include fastcgi_params;
- }
- include vhosts/rewrite.conf;
- }
- ############{{user}}############
- ##########**{{user}}**##########
- [{user}]
- comment = {user}.lava.cn
- path = /home/{user}
- public = no
- browseable=no
- writable = yes
- printable = no
- valid users = {user}
- write list = {user}
- read only = no
- create mask = 775
- delete readonly = yes
- ##########**{{user}}**##########
复制代码 |
|