lsync
lsync
- Installation
- apache lsync config
- iNotify Watches
- some_lsyncd_options - Page not found.
vim /etc/sysconfig/httpd OPTIONS="-DSLAVE"
lsync.txt · Last modified: by 127.0.0.1
Add the following to the /etc/sysconfig/httpd
OPTIONS="-DSLAVE" export MASTER_SERVER="SERVICENET IP HERE"
<IfDefine SLAVE>
RewriteEngine On
ProxyPreserveHost On
ProxyPass /wp-admin/ http://${MASTER_SERVER}/wp-admin/
ProxyPassReverse /wp-admin/ http://${MASTER_SERVER}/wp-admin/
RewriteCond %{REQUEST_METHOD} =POST
RewriteRule . http://${MASTER_SERVER}%{REQUEST_URI} [P]
</IfDefine>
You will need to make sure the proxy_http is enabled!
Sometimes lsync stops working and the error message you receive is relating to increasing inotify watches.
View Current config
cat /proc/sys/fs/inotify/max_user_watches
find /var/www/vhosts/ -type d | wc -l | awk '{print $1" directories needs monitoring, set [ fs.inotify.max_user_watches = " $1*3" ]"}'
echo "fs.inotify.max_user_watches=value >> /etc/sysctl.conf sysctl -p /etc/sysctl.conf
for foo in /proc/*/fd/*; do readlink -f $foo; done |grep inotify |cut -d/ -f3 |xargs -I '{}' -- ps --no-headers -o '%p %U %c' -p '{}' |uniq -c |sort -nr
vim /etc/sysconfig/httpd OPTIONS="-DSLAVE"