My pasteblog

This is not my Zettelkasten but a durable .bash_history

Subscribe to RSS feed

Posts tagged with "apache"

Basic WebDAV and vhost setup on a LVM volume

lvcreate -v -L3G -nMyUserName vg
mke2fs -T largefile -j -v -m 1 /dev/vg/MyUserName
mount /dev/vg/MyUserName var/dav/MyUserName/
superadduser
chown -R apache:apache /var/dav/MyUserName
vi /etc/apache2/modules.d/45_mod_dav.conf

<IfModule mod_dav.c>
Alias /MyUserName /var/dav/MyUserName
#snip
<Location /MyUserName>
Dav On
Options Indexes
<Limit PUT POST DELETE PROPPATCH COPY MOVE LOCK UNLOCK>
AuthType Basic
AuthName "WebDAV Restricted Repository"
AuthUserFile /path/to/.davpasswd
Require user MyUserName
</Limit>
</Location>
</IfModule>


htpasswd2 -b /path/to.davpasswd MyUserName MyPassword
vi /etc/apache2/vhosts.d/vhosts.conf

<VirtualHost 217.160.106.95:80>
ServerName MyUserName.de
DocumentRoot /var/dav/MyUserName/web
<Directory /var/dav/MyUserName/web>
Order allow,deny
Allow from all
Options -Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
</Directory>
</VirtualHost>


/etc/init.d/apache2 restart

shell script via Apache/PHP

, , , ...

NOPASSWD: /bin/sh, /path/to/script.sh
script.sh chmod 6755
August 2007
S M T W T F S
July 2007September 2007
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31