2015年10月5日 星期一
Apache 使用virtualbox分享資料夾做為www資料夾內容 gitweb設定
1) Power the VM down and add the shared folder with the Virtualbox Manager (never works right for me if VM is on)
2) Power on the VM and make your symbolic link to the shared folder where ever you want your web root to be:
ln -s /media/sf_share /var/www
chown -h www-data /var/www
NOTE: If your OS runs apache under the user: apache or apache2, replace www-data with that.
3) Add the user apache runs under to the group vboxsrv. Edit /etc/group and on the line that defines the vboxsrv group. Here is what my line in the group file looks like:
vboxsf:x:1001:sean,www-data
NOTE: Again, swap out www-data for the user apache runs under, if not www-data.
4) Reboot the VM.
重點是在建立soft link到www資料夾下 step 2
https://forums.virtualbox.org/viewtopic.php?f=3&t=34922
檢查link是否建立成功
http://linux.vbird.org/linux_basic/0230filesystem.php#ln
apache tool
htdigest -c 建立密碼檔
mod-avaliable and mod-enabled
使用symbolic link把avaliable link到enable下,apache啟動時會讀取enable下之所有module
gitweb需要load module如下
alias.conf
alias.load
auth_basic.load
auth_digest.load
authn_file.load
authz_default.load
authz_groupfile.load
authz_host.load
authz_user.load
autoindex.conf
autoindex.load
cgi.load
dav_fs.conf
dav_fs.load
dav.load
deflate.conf
deflate.load
dir.conf
dir.load
env.load
mime.conf
mime.load
negotiation.conf
negotiation.load
php5.conf
php5.load
reqtimeout.conf
reqtimeout.load
setenvif.conf
setenvif.load
status.conf
status.load
gitolite client設定
git clone git@<ip>:<repository name>.git
以下需在repository目錄下
看狀態 git status
commit 差異文件 git commit -a
上傳 git push <remote name, default origin> <branch name/master>
加入檔案 git add <file1> <file2> ...
git remote add [<options>] <name> <url>
參考資料
同事
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言