Originally Posted by
Max128
Я все сделал по инструкции. Кроме порта, порт поставил 65000. Вопросы&комментари:
1. Если меняем порт то его надо поправить везде включая конфиг wTorrent
да, но чтобы это исправить, у меня есть патч к wtorrent
wtorrent-replace.sh:
Code:
#!/bin/sh
cd /opt/share/www/wtorrent || exit 1
echo 'replace constant DIR_EXEC with $GLOBALS["dir_exec"]'
#
touch .1
find . -type f -iname home.conf.php -exec grep -s -l "^define( 'DIR_EXEC'," {} \; | \
xargs sed -i "s/^define( 'DIR_EXEC',.*/\$dir_exec = getcwd() . '\/'; \/\/ /g"
find . -type f -iname \*.php ! -name sample.home.conf.php -exec grep -s -l DIR\_EXEC {} \; | \
xargs sed -i 's/DIR\_EXEC/\$GLOBALS["dir_exec"]/g'
echo altered files:
find . -type f -iname \*.php -newer .1
rm .1
echo 'replace constant RT_PORT with $GLOBALS["rt_port"]'
touch .1
find . -type f -iname home.conf.php -exec grep -s -l "^define( 'RT_PORT'," {} \; | \
xargs sed -i "s/^define( 'RT_PORT',.*/\$rt_port = \$_SERVER['SERVER_PORT']; \/\/ /g"
find . -type f -iname \*.php ! -name sample.home.conf.php -exec grep -s -l RT\_PORT {} \; | \
xargs sed -i 's/RT\_PORT/\$GLOBALS["rt_port"]/g'
echo altered files:
find . -type f -iname \*.php -newer .1
rm .1
Originally Posted by
Max128
2. В конфиге для rTorrent нужно таки прописать
PHP Code:
scgi_port = localhost:5000
это точно есть в инструкции на том сайте
Originally Posted by
Max128
3. Когда я в браузере захожу на роутер по умолчанию открывается
эт нормально? или надо в настроках lighttpd таки указать
server.document-root = /opt/share/www/wtorrent/?
lighttpd.conf:
Code:
# надо отключить листинги по умолчанию.
# закоментировать
#dir-listing.activate = "enable"
# а чтобы включить листинги для отдельных директорий например:
$HTTP["url"] =~ "^/downloads($|/)" { server.dir-listing = "enable" }