Jump to content

ownCloud - строим личное облачное хранилище


Recommended Posts

В 18.08.2016 в 00:07, TheBB сказал:

nginx.conf


client_max_body_size 1024M;

php.ini


upload_max_filesize = 1024M

post_max_size = 1024M

Выставил все как сказано, но в админке ничего не поменялось, также 513 Мб, где я ошибся?

Link to comment
Share on other sites

Добрый день.

Giga II -  v2.08(AAFS.3)A8 - Файловая система носителя NTFS

Чаще одного раза в сутки хранилище отваливается и я наблюдаю такую страницу

Скрытый текст

1.png

Останавливается php. Запускаю скрипт:

/opt/etc/init.d/S79php-fcgi start

И хранилище снова доступно.

Подскажите, куда смотреть?

Edited by Dmitriy
Link to comment
Share on other sites

  • 2 weeks later...

Всем привет. Установил все по инструкции, все прекрасно, но есть два но:

1. как уже тут говорилось, облако ворочается очень медленно. Можно как-то убыстрить?
2. не получается изменить размер загружаемого файла, так и висит 513Мб...

Заранее спасибо за ответы!

Link to comment
Share on other sites

30 минут назад, chulkov_dn сказал:

1. как уже тут говорилось, облако ворочается очень медленно. Можно как-то убыстрить?

Можно! Сносите нафих сие с кинетика и ставите на ПК, на крайняк - на NAS

30 минут назад, chulkov_dn сказал:

2. не получается изменить размер загружаемого файла, так и висит 513Мб...

Читаем, напр., здесь https://doc.owncloud.org/server/8.1/user_manual/files/large_file_upload.html или в другом мануале

Link to comment
Share on other sites

21 час назад, TheBB сказал:

Можно! Сносите нафих сие с кинетика и ставите на ПК, на крайняк - на NAS

Читаем, напр., здесь https://doc.owncloud.org/server/8.1/user_manual/files/large_file_upload.html или в другом мануале

Я тоже думаю что это решение только для побаловаться к сожалению

  • Thanks 1
Link to comment
Share on other sites

22 минуты назад, Илларион сказал:

Я тоже думаю что это решение только для побаловаться к сожалению

Я так абсолютно не думаю, т.к. разница между маршрутизатором  и ПК мне известна ))) И не пытаюсь "впихнуть невпихуемое" или превратить Кинетик в мейнфрейм

Решение вполне себе рабочее и, для примера, "жменька" ссылок (взяты произвольно, но примечательны даты публикаций) )))

[HOW-TO] Установка и настройка ownCloud на роутере

Личное облако OwnCloud на роутере Asus

Asus RT-68U + TomatoUSB 131 + ownCloud 8.1

Link to comment
Share on other sites

55 минут назад, TheBB сказал:

Я так абсолютно не думаю, т.к. разница между маршрутизатором  и ПК мне известна ))) И не пытаюсь "впихнуть невпихуемое" или превратить Кинетик в мейнфрейм

Решение вполне себе рабочее и, для примера, "жменька" ссылок (взяты произвольно, но примечательны даты публикаций) )))

[HOW-TO] Установка и настройка ownCloud на роутере

Личное облако OwnCloud на роутере Asus

Asus RT-68U + TomatoUSB 131 + ownCloud 8.1

Да решение то рабочее, я не про то говорю. Пользоваться с такими тормозами нереально, все слишком медленно, ну по крайней мере для меня, может если чисто фоточки с телефона синхронить оно и ничо.

А мне надо видосы смотреть, файловые базы синхронить, бекапы туда сюда... :-)

Edited by Илларион
уп
  • Thanks 1
Link to comment
Share on other sites

Привет всем!

 

установил оунклауд. создал юзеров.

при шаринге файла можно сделать список юзеров, кому хочу поделится?

в строке поиска писать имя не удобно и не всегда помнишь кому дано доступ.

Link to comment
Share on other sites

  • 4 months later...

Здравствуйте, спасибо за инструкцию, все завелось, но вот при попытке скачать какой либо файл пишет ошибку не удаётся получить доступ к сайту. Загружать получается, а вот скачивать не даёт.  Подскажите пож-та, где копать? P.s, через вебдав скачивает нормально.

Edited by Сергей Бобышкин
Link to comment
Share on other sites

  • 1 month later...
В 20.08.2016 в 12:17, QuAzI сказал:

А будут мануалы по обновлению? Старую версию опасно использовать. Через веб-морду не обновиться.

https://doc.owncloud.org/server/8.1/admin_manual/maintenance/upgrade.html - Это как обновиться

К примеру, у тебя возникло сообщение, что вышла версия 8.1.12

1. Соответственно в консольке рисуешь:

cd /opt/share/www
wget http://download.owncloud.org/community/owncloud-8.1.12.tar.bz2

2. В выделенное место пихаешь версию, что нужно скачать! (То что возникло в облаке ... новая версия, бла, бла, бла...)

Если читал инструкцию, TheBB это все описал. Далее надо просто немного почитать и мышкой пощелкать.

3. data/ and config/ Оставляешь! Остальное удаляешь и разархивируешь то, что пришло (/opt/share/www) в свою папку без папок data/ and config/!!!

Далее заходишь себе на облочко и нажимаешь UPRADE...

Все радуешься. Но не долго. Если ты читал все сообщения в форуме, то видел как у людей заканчивались попытки накинуть последние версии и что но это отвечал, уважаемый, TheBB.

Не все новые версии пока тестировались на совместимость. Не факт что у Вас после обновления все заработает. Ну расскажете хоть нам на какой версии все потухло )))

Link to comment
Share on other sites

Вот все вроде ясно. Вот одно ставлю, работает. Другое перестает. mysql + nginx + owncloud - Работает. А торрент монитор, который использует mysql + nginx - Перестал.

При попытке зайти на http://192.168.77.1:88/tm/# - пытается сохранить файл "Без названия" с содержимым:

<?php
$dir = dirname(__FILE__)."/";
include_once $dir."config.php";
include_once $dir."class/Database.class.php";
include_once $dir."class/System.class.php";

if (Sys::checkAuth())
    require_once "pages/main.php";
else
    require_once "pages/auth.php";
?>

Пишу сюда, т.к. Torrent Monitor перестал работать после установки OwnCloud. Что может это быть?

 
Модель	Keenetic Ultra II
Версия NDMS	v2.08(AAUX.0)C2




May 17 02:51:01cron[1675]
(root) CMD (/opt/bin/run-parts /opt/etc/cron.1min^I)
May 17 02:51:16transmissiond
tr_crypto error:05066066:lib(5):func(102):reason(102)
May 17 02:51:30root
Started mysqld from .
May 17 02:51:37root
Started php-fcgi from .
May 17 02:52:01cron[1718]
(root) CMD (/opt/bin/run-parts /opt/etc/cron.1min^I)
May 17 02:52:22transmissiond
tr_crypto error:05066066:lib(5):func(102):reason(102)
May 17 02:52:46transmissiond
Core::Syslog: last message repeated 2 times.
May 17 02:53:01cron[1749]
(root) CMD (/opt/bin/run-parts /opt/etc/cron.1min^I)
 
Link to comment
Share on other sites

  • 5 weeks later...

lighttpd+php7+sqlite+ssl=owncloud-10.0.2

ставим пакеты

opkg install ca-certificates curl lighttpd lighttpd-mod-cgi lighttpd-mod-fastcgi openssl-util \
php7-cli php7-fastcgi php7-mod-ctype php7-mod-curl php7-mod-dom php7-mod-fileinfo php7-mod-gd \
php7-mod-hash php7-mod-json php7-mod-mbstring php7-mod-pdo-sqlite php7-mod-session php7-mod-simplexml \
php7-mod-sqlite3 php7-mod-xml php7-mod-xmlreader php7-mod-xmlwriter php7-mod-zip tar

забираем архив

curl https://download.owncloud.org/community/owncloud-10.0.2.tar.bz2 --output oc.tar.bz2

распаковываем

tar xjvf oc.tar.bz2 -C /opt/share/www/

правим php.ini

Скрытый текст

 


[PHP]
zend.ze1_compatibility_mode = Off

; Language Options

engine = On
;short_open_tag = Off
precision    =  12
y2k_compliance = On
output_buffering = Off
;output_handler =
zlib.output_compression = Off
;zlib.output_compression_level = -1
;zlib.output_handler =
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 100

;open_basedir =
disable_functions =
disable_classes =

; Colors for Syntax Highlighting mode.  Anything that's acceptable in
; <span style="color: ???????"> would work.
;highlight.string  = #DD0000
;highlight.comment = #FF9900
;highlight.keyword = #007700
;highlight.bg      = #FFFFFF
;highlight.default = #0000BB
;highlight.html    = #000000

;ignore_user_abort = On
;realpath_cache_size = 16k
;realpath_cache_ttl = 120

; Miscellaneous

expose_php = On

; Resource Limits

max_execution_time = 30	; Maximum execution time of each script, in seconds.
max_input_time = 60	; Maximum amount of time each script may spend parsing request data.
;max_input_nesting_level = 64
memory_limit = 32M

; Error handling and logging

; Error Level Constants:
; E_ALL             - All errors and warnings (includes E_STRICT as of PHP 6.0.0)
; E_ERROR           - fatal run-time errors
; E_RECOVERABLE_ERROR  - almost fatal run-time errors
; E_WARNING         - run-time warnings (non-fatal errors)
; E_PARSE           - compile-time parse errors
; E_NOTICE          - run-time notices (these are warnings which often result
;                     from a bug in your code, but it's possible that it was
;                     intentional (e.g., using an uninitialized variable and
;                     relying on the fact it's automatically initialized to an
;                     empty string)
; E_STRICT			- run-time notices, enable to have PHP suggest changes
;                     to your code which will ensure the best interoperability
;                     and forward compatibility of your code
; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
;                     initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR      - user-generated error message
; E_USER_WARNING    - user-generated warning message
; E_USER_NOTICE     - user-generated notice message
; E_DEPRECATED      - warn about code that will not work in future versions
;                     of PHP
; E_USER_DEPRECATED - user-generated deprecation warnings
;
; Common Values:
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
; Default Value: E_ALL & ~E_NOTICE
error_reporting  =  E_ALL & ~E_NOTICE & ~E_STRICT

display_errors = On
display_startup_errors = Off
log_errors = Off
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
;report_zend_debug = 0
track_errors = Off
;html_errors = Off
;docref_root = "/phpmanual/"
;docref_ext = .html
;error_prepend_string = "<font color=#ff0000>"
;error_append_string = "</font>"
; Log errors to specified file.
;error_log = /opt/var/log/php_errors.log
; Log errors to syslog.
;error_log = syslog

; Data Handling

;arg_separator.output = "&amp;"
;arg_separator.input = ";&"
variables_order = "EGPCS"
request_order = "GP"
register_globals = Off
register_long_arrays = Off
register_argc_argv = On
auto_globals_jit = On
post_max_size = 512M
;magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
;default_charset = "iso-8859-1"
;always_populate_raw_post_data = On

; Paths and Directories

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
doc_root = "/opt/share/www"
user_dir =
extension_dir = "/opt/lib/php"
enable_dl = On
;cgi.force_redirect = 1
;cgi.nph = 1
;cgi.redirect_status_env = ;
cgi.fix_pathinfo=1
;fastcgi.impersonate = 1;
;fastcgi.logging = 0
;cgi.rfc2616_headers = 0

; File Uploads

file_uploads = On
upload_tmp_dir = "/opt/tmp"
upload_max_filesize = 512M
max_file_uploads = 20

; Fopen wrappers

allow_url_fopen = On
allow_url_include = Off
;from="john@doe.com"
;user_agent="PHP"
default_socket_timeout = 60
;auto_detect_line_endings = Off

 

правим lighttpd.conf

Скрытый текст

 


server.document-root        = "/opt/share/www"
server.upload-dirs          = ( "/tmp" )
server.errorlog             = "/opt/var/log/lighttpd/error.log"
server.pid-file             = "/opt/var/run/lighttpd.pid"
#server.username             = "http"
#server.groupname            = "www-data"

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm",
                              )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

### Options that are useful but not always necessary:
#server.chroot               = "/"
server.port                 = 81
#server.bind                 = "localhost"
#server.tag                  = "lighttpd"
#server.errorlog-use-syslog  = "enable"
server.network-backend      = "writev"

### Use IPv6 if available
#include_shell "/opt/share/lighttpd/use-ipv6.pl"

#dir-listing.encoding        = "utf-8"
#server.dir-listing          = "enable"

include "/opt/etc/lighttpd/mime.conf"
include "/opt/etc/lighttpd/conf.d/*.conf"

$HTTP["url"] =~ "^/owncloud/data/" {
url.access-deny = ("")
}
$HTTP["url"] =~ "^/owncloud($|/)" {
dir-listing.activate = "disable"
}

#ssl
$SERVER["socket"] == ":443" {
    ssl.engine = "enable"
    ssl.pemfile = "/opt/etc/lighttpd/certs/lighttpd.pem"

    # enforce strong cypher
    ssl.use-sslv2 = "disable"
    ssl.cipher-list = "TLSv1+HIGH !SSLv2 RC4+MEDIUM !aNULL !eNULL !3DES @STRENGTH"
}

 

правим 30-fastcgi.conf

Скрытый текст

 


#######################################################################
##
##  FastCGI Module 
## --------------- 
##
## See http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI
##
server.modules += ( "mod_fastcgi" )

##
## PHP Example
## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
##
## The number of php processes you will get can be easily calculated:
##
## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
##
## for the php-num-procs example it means you will get 17*5 = 85 php
## processes. you always should need this high number for your very
## busy sites. And if you have a lot of RAM. :)
##
fastcgi.server = ( ".php" =>
                   ( "php-local" =>
                     (
                       "socket" => "/opt/tmp/php-fastcgi-1.socket",
                       "bin-path" => "/opt/bin/php-fcgi",
                       "max-procs" => 1,
                       "broken-scriptfilename" => "enable",
                     )
                   ),
#                   ( "php-tcp" =>
#                     (
#                       "host" => "127.0.0.1",
#                       "port" => 9999,
#                       "check-local" => "disable",
#                       "broken-scriptfilename" => "enable",
#                     )
#                   ),
#
#                   ( "php-num-procs" =>
#                     (
#                       "socket" => socket_dir + "/php-fastcgi-2.socket",
#                       "bin-path" => server_root + "/cgi-bin/php5",
#                       "bin-environment" => (
#                         "PHP_FCGI_CHILDREN" => "16",
#                         "PHP_FCGI_MAX_REQUESTS" => "10000",
#                       ),
#                       "max-procs" => 5,
#                       "broken-scriptfilename" => "enable",
#                     )
#                   ),
                )

##
## Ruby on Rails Example
##
## Normally you only run one Rails application on one vhost.
##
#$HTTP["host"] == "rails1.example.com" {
#  server.document-root  = server_root + "/rails/someapp/public"
#  server.error-handler-404 = "/dispatch.fcgi"
#  fastcgi.server = ( ".fcgi" =>
#    ("someapp" =>
#      ( "socket" => socket_dir + "/someapp-fcgi.socket",
#        "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
#        "bin-environment" => (
#              "RAILS_ENV" => "production",
#              "TMP" => home_dir + "/rails/someapp",
#        ),
#      )
#    )
#  )
#}

##
## Another example with multiple rails applications on one vhost.
##
## http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps
##
#$HTTP["host"] == "rails2.example.com" {
#  $HTTP["url"] =~ "^/someapp1" {
#    server.document-root  = server_root + "/rails/someapp1/public"
#    server.error-handler-404 = "/dispatch.fcgi"
#    fastcgi.server = ( ".fcgi" =>
#      ("someapp1" =>
#        ( "socket" => socket_dir + "/someapp1-fcgi.socket",
#          "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
#          "bin-environment" => (
#                "RAILS_ENV" => "production",
#                "TMP" => home_dir + "/rails/someapp1",
#          ),
#          "strip-request-uri" => "/someapp1/"
#        )
#      )
#    )
#  }
#
#  $HTTP["url"] =~ "^/someapp2" {
#    server.document-root  = server_root + "/rails/someapp2/public"
#    server.error-handler-404 = "/dispatch.fcgi"
#    fastcgi.server = ( ".fcgi" =>
#      ("someapp2" =>
#        ( "socket" => socket_dir + "/someapp2-fcgi.socket",
#          "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
#          "bin-environment" => (
#                "RAILS_ENV" => "production",
#                "TMP" => home_dir + "/rails/someapp2",
#          ),
#          "strip-request-uri" => "/someapp2/"
#        )
#      )
#    )
#  }
#}

## chrooted webserver + external PHP
##
## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
##
## webserver chrooted to /srv/www/
## php running outside the chroot
#
#fastcgi.server = ( 
#  ".php" => (( 
#    "host" => "127.0.0.1",
#    "port" => "2000",
#    "docroot" => "/srv/www/servers/www.example.org/htdocs/"
#  )))
#
#server.chroot = "/srv/www"
#server.document-root = "/servers/wwww.example.org/htdocs/"
#

##
#######################################################################

 

создаём папку

mkdir -p ../etc/lighttpd/certs

переходим в неё, создаём pem-файл и задаём ему права

cd /opt/etc/lighttpd/certs/
openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 1095 -nodes
chmod 400 lighttpd.pem

проверяем корректность конфига

lighttpd -t -f /opt/etc/lighttpd/lighttpd.conf

запускаем сервер (или рестартим запущенный)

/opt/etc/init.d/S80lighttpd start

идём по адресу (своего устройства) и вводим данные (свои) и жмём "Завершить установку"

screen_186.png

на выходе имеем

screen_187.png

"закручиваем гайки" и настраиваем под себя...

  • Thanks 1
Link to comment
Share on other sites

@TheBB, кстати, я смог запустить OwnCloud 10 на связке php7+mysql+nginx,

но другая проблема теперь: не могу правильно настроить, чтобы работал в 192.168.1.1/ow/, так как постоянно делает редирект с  /ow/index.php/login на /index.php/login. 

Может ты знаешь, какой правильный конфиг nginx надо для  Ow10, который (ow10) будет располагаться именно на 192.168.1.1/ow/ , а не на 192.168.1.1/

Edited by edm
php7
Link to comment
Share on other sites

:) кстати, я тоже, только с другим составом: lighttpd+php7+mariadb (к слову, на тестовой системе - uClibc-ng 1.0.25)

настройки и конфиги можно глянуть на оф.сайте owncloud

Link to comment
Share on other sites

nginx + php7 + mysql_из_дебиан (mariadb не пробовал еще)

opkg install php7-cli php7-fastcgi php7-mod-ctype php7-mod-curl php7-mod-dom php7-mod-fileinfo php7-mod-gd php7-mod-hash php7-mod-json php7-mod-mbstring php7-mod-session php7-mod-simplexml php7-mod-xml php7-mod-xmlreader php7-mod-xmlwriter php7-mod-zip

opkg install php7-mod-mysqli php7-mod-pdo-mysql php7-mod-intl php7-mod-iconv 

рестарт php7

#в терминале entware создать символическую ссылку

ln -s /путь_рабочей_mysqld.sock /opt/tmp/mysql.sock

#если mysql из дебиан, то

ln - s /opt/debian/run/mysqld/mysqld.cock /opt/tmp/mysql.sock

 

потом 4 sql-запроса

1. CREATE DATABASE `owncloud10` COLLATE 'utf8_general_ci';

2. CREATE USER 'owncloud10'@'localhost' IDENTIFIED BY 'owncloud10';

3. GRANT ALL PRIVILEGES ON `owncloud10`.* TO 'owncloud10'@'localhost';

4. REVOKE ALL PRIVILEGES ON `owncloud10`.* FROM 'owncloud10'@'localhost'; GRANT ALL PRIVILEGES ON `owncloud10`.* TO 'owncloud10'@'localhost'WITH GRANT OPTION;

 

 

 

и в 192.168.1.1/owncloud10/

во всех полях вводить "owncloud10": логин админа, пароль админа, логин ДБ, пароль ДБ, название БД.

а в самом последнем поле вводить: localhost:3306

 

после этого установилась ow10, но из-за кривого конфига nginx ушла в ошибку

Link to comment
Share on other sites

  • 1 month later...
В 16.06.2017 в 22:41, TheBB сказал:

lighttpd+php7+sqlite+ssl=owncloud-10.0.2

ставим пакеты


opkg install ca-certificates curl lighttpd lighttpd-mod-cgi lighttpd-mod-fastcgi openssl-util \
php7-cli php7-fastcgi php7-mod-ctype php7-mod-curl php7-mod-dom php7-mod-fileinfo php7-mod-gd \
php7-mod-hash php7-mod-json php7-mod-mbstring php7-mod-pdo-sqlite php7-mod-session php7-mod-simplexml \
php7-mod-sqlite3 php7-mod-xml php7-mod-xmlreader php7-mod-xmlwriter php7-mod-zip tar

забираем архив


curl https://download.owncloud.org/community/owncloud-10.0.2.tar.bz2 --output oc.tar.bz2

распаковываем


tar xjvf oc.tar.bz2 -C /opt/share/www/

правим php.ini

  Показать содержимое

 



[PHP]
zend.ze1_compatibility_mode = Off

; Language Options

engine = On
;short_open_tag = Off
precision    =  12
y2k_compliance = On
output_buffering = Off
;output_handler =
zlib.output_compression = Off
;zlib.output_compression_level = -1
;zlib.output_handler =
implicit_flush = Off
unserialize_callback_func =
serialize_precision = 100

;open_basedir =
disable_functions =
disable_classes =

; Colors for Syntax Highlighting mode.  Anything that's acceptable in
; <span style="color: ???????"> would work.
;highlight.string  = #DD0000
;highlight.comment = #FF9900
;highlight.keyword = #007700
;highlight.bg      = #FFFFFF
;highlight.default = #0000BB
;highlight.html    = #000000

;ignore_user_abort = On
;realpath_cache_size = 16k
;realpath_cache_ttl = 120

; Miscellaneous

expose_php = On

; Resource Limits

max_execution_time = 30	; Maximum execution time of each script, in seconds.
max_input_time = 60	; Maximum amount of time each script may spend parsing request data.
;max_input_nesting_level = 64
memory_limit = 32M

; Error handling and logging

; Error Level Constants:
; E_ALL             - All errors and warnings (includes E_STRICT as of PHP 6.0.0)
; E_ERROR           - fatal run-time errors
; E_RECOVERABLE_ERROR  - almost fatal run-time errors
; E_WARNING         - run-time warnings (non-fatal errors)
; E_PARSE           - compile-time parse errors
; E_NOTICE          - run-time notices (these are warnings which often result
;                     from a bug in your code, but it's possible that it was
;                     intentional (e.g., using an uninitialized variable and
;                     relying on the fact it's automatically initialized to an
;                     empty string)
; E_STRICT			- run-time notices, enable to have PHP suggest changes
;                     to your code which will ensure the best interoperability
;                     and forward compatibility of your code
; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
;                     initial startup
; E_COMPILE_ERROR   - fatal compile-time errors
; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; E_USER_ERROR      - user-generated error message
; E_USER_WARNING    - user-generated warning message
; E_USER_NOTICE     - user-generated notice message
; E_DEPRECATED      - warn about code that will not work in future versions
;                     of PHP
; E_USER_DEPRECATED - user-generated deprecation warnings
;
; Common Values:
;   E_ALL & ~E_NOTICE  (Show all errors, except for notices and coding standards warnings.)
;   E_ALL & ~E_NOTICE | E_STRICT  (Show all errors, except for notices)
;   E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR  (Show only errors)
;   E_ALL | E_STRICT  (Show all errors, warnings and notices including coding standards.)
; Default Value: E_ALL & ~E_NOTICE
error_reporting  =  E_ALL & ~E_NOTICE & ~E_STRICT

display_errors = On
display_startup_errors = Off
log_errors = Off
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
;report_zend_debug = 0
track_errors = Off
;html_errors = Off
;docref_root = "/phpmanual/"
;docref_ext = .html
;error_prepend_string = "<font color=#ff0000>"
;error_append_string = "</font>"
; Log errors to specified file.
;error_log = /opt/var/log/php_errors.log
; Log errors to syslog.
;error_log = syslog

; Data Handling

;arg_separator.output = "&amp;"
;arg_separator.input = ";&"
variables_order = "EGPCS"
request_order = "GP"
register_globals = Off
register_long_arrays = Off
register_argc_argv = On
auto_globals_jit = On
post_max_size = 512M
;magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
;default_charset = "iso-8859-1"
;always_populate_raw_post_data = On

; Paths and Directories

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
doc_root = "/opt/share/www"
user_dir =
extension_dir = "/opt/lib/php"
enable_dl = On
;cgi.force_redirect = 1
;cgi.nph = 1
;cgi.redirect_status_env = ;
cgi.fix_pathinfo=1
;fastcgi.impersonate = 1;
;fastcgi.logging = 0
;cgi.rfc2616_headers = 0

; File Uploads

file_uploads = On
upload_tmp_dir = "/opt/tmp"
upload_max_filesize = 512M
max_file_uploads = 20

; Fopen wrappers

allow_url_fopen = On
allow_url_include = Off
;from="john@doe.com"
;user_agent="PHP"
default_socket_timeout = 60
;auto_detect_line_endings = Off

 

правим lighttpd.conf

  Скрыть содержимое

 



server.document-root        = "/opt/share/www"
server.upload-dirs          = ( "/tmp" )
server.errorlog             = "/opt/var/log/lighttpd/error.log"
server.pid-file             = "/opt/var/run/lighttpd.pid"
#server.username             = "http"
#server.groupname            = "www-data"

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm",
                              )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

### Options that are useful but not always necessary:
#server.chroot               = "/"
server.port                 = 81
#server.bind                 = "localhost"
#server.tag                  = "lighttpd"
#server.errorlog-use-syslog  = "enable"
server.network-backend      = "writev"

### Use IPv6 if available
#include_shell "/opt/share/lighttpd/use-ipv6.pl"

#dir-listing.encoding        = "utf-8"
#server.dir-listing          = "enable"

include "/opt/etc/lighttpd/mime.conf"
include "/opt/etc/lighttpd/conf.d/*.conf"

$HTTP["url"] =~ "^/owncloud/data/" {
url.access-deny = ("")
}
$HTTP["url"] =~ "^/owncloud($|/)" {
dir-listing.activate = "disable"
}

#ssl
$SERVER["socket"] == ":443" {
    ssl.engine = "enable"
    ssl.pemfile = "/opt/etc/lighttpd/certs/lighttpd.pem"

    # enforce strong cypher
    ssl.use-sslv2 = "disable"
    ssl.cipher-list = "TLSv1+HIGH !SSLv2 RC4+MEDIUM !aNULL !eNULL !3DES @STRENGTH"
}

 

правим 30-fastcgi.conf

  Показать содержимое

 



#######################################################################
##
##  FastCGI Module 
## --------------- 
##
## See http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs_ModFastCGI
##
server.modules += ( "mod_fastcgi" )

##
## PHP Example
## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
##
## The number of php processes you will get can be easily calculated:
##
## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
##
## for the php-num-procs example it means you will get 17*5 = 85 php
## processes. you always should need this high number for your very
## busy sites. And if you have a lot of RAM. :)
##
fastcgi.server = ( ".php" =>
                   ( "php-local" =>
                     (
                       "socket" => "/opt/tmp/php-fastcgi-1.socket",
                       "bin-path" => "/opt/bin/php-fcgi",
                       "max-procs" => 1,
                       "broken-scriptfilename" => "enable",
                     )
                   ),
#                   ( "php-tcp" =>
#                     (
#                       "host" => "127.0.0.1",
#                       "port" => 9999,
#                       "check-local" => "disable",
#                       "broken-scriptfilename" => "enable",
#                     )
#                   ),
#
#                   ( "php-num-procs" =>
#                     (
#                       "socket" => socket_dir + "/php-fastcgi-2.socket",
#                       "bin-path" => server_root + "/cgi-bin/php5",
#                       "bin-environment" => (
#                         "PHP_FCGI_CHILDREN" => "16",
#                         "PHP_FCGI_MAX_REQUESTS" => "10000",
#                       ),
#                       "max-procs" => 5,
#                       "broken-scriptfilename" => "enable",
#                     )
#                   ),
                )

##
## Ruby on Rails Example
##
## Normally you only run one Rails application on one vhost.
##
#$HTTP["host"] == "rails1.example.com" {
#  server.document-root  = server_root + "/rails/someapp/public"
#  server.error-handler-404 = "/dispatch.fcgi"
#  fastcgi.server = ( ".fcgi" =>
#    ("someapp" =>
#      ( "socket" => socket_dir + "/someapp-fcgi.socket",
#        "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
#        "bin-environment" => (
#              "RAILS_ENV" => "production",
#              "TMP" => home_dir + "/rails/someapp",
#        ),
#      )
#    )
#  )
#}

##
## Another example with multiple rails applications on one vhost.
##
## http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps
##
#$HTTP["host"] == "rails2.example.com" {
#  $HTTP["url"] =~ "^/someapp1" {
#    server.document-root  = server_root + "/rails/someapp1/public"
#    server.error-handler-404 = "/dispatch.fcgi"
#    fastcgi.server = ( ".fcgi" =>
#      ("someapp1" =>
#        ( "socket" => socket_dir + "/someapp1-fcgi.socket",
#          "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
#          "bin-environment" => (
#                "RAILS_ENV" => "production",
#                "TMP" => home_dir + "/rails/someapp1",
#          ),
#          "strip-request-uri" => "/someapp1/"
#        )
#      )
#    )
#  }
#
#  $HTTP["url"] =~ "^/someapp2" {
#    server.document-root  = server_root + "/rails/someapp2/public"
#    server.error-handler-404 = "/dispatch.fcgi"
#    fastcgi.server = ( ".fcgi" =>
#      ("someapp2" =>
#        ( "socket" => socket_dir + "/someapp2-fcgi.socket",
#          "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
#          "bin-environment" => (
#                "RAILS_ENV" => "production",
#                "TMP" => home_dir + "/rails/someapp2",
#          ),
#          "strip-request-uri" => "/someapp2/"
#        )
#      )
#    )
#  }
#}

## chrooted webserver + external PHP
##
## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
##
## webserver chrooted to /srv/www/
## php running outside the chroot
#
#fastcgi.server = ( 
#  ".php" => (( 
#    "host" => "127.0.0.1",
#    "port" => "2000",
#    "docroot" => "/srv/www/servers/www.example.org/htdocs/"
#  )))
#
#server.chroot = "/srv/www"
#server.document-root = "/servers/wwww.example.org/htdocs/"
#

##
#######################################################################

 

создаём папку


mkdir -p ../etc/lighttpd/certs

переходим в неё, создаём pem-файл и задаём ему права


cd /opt/etc/lighttpd/certs/
openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 1095 -nodes
chmod 400 lighttpd.pem

проверяем корректность конфига


lighttpd -t -f /opt/etc/lighttpd/lighttpd.conf

запускаем сервер (или рестартим запущенный)


/opt/etc/init.d/S80lighttpd start

идём по адресу (своего устройства) и вводим данные (свои) и жмём "Завершить установку"

screen_186.png

на выходе имеем

screen_187.png

"закручиваем гайки" и настраиваем под себя...

сделал по этой инструкции, в ответ в журнале

Jul 25 00:08:32ndmkernel: mtdoops_proc: page is busy
Jul 25 00:08:32ndmkernel: mtdoops_proc: page is busy
Jul 25 00:08:34ndmkernel: Kernel bug detected[#14]:
Jul 25 00:08:34ndmkernel: Cpu 0
Jul 25 00:08:34ndmkernel: $ 0   : 00000000 00000002 00000001 80000000
Jul 25 00:08:34ndmkernel: $ 4   : 811c7be0 7f999faf 81000000 00001fff
Jul 25 00:08:34ndmkernel: $ 8   : 7f999faf 8137e000 00000011 fffffff8
Jul 25 00:08:34ndmkernel: $12   : 20343232 000000ad 00000000 004a0000
Jul 25 00:08:34ndmkernel: $16   : 0000000e 811c7be0 8137e000 7f999faf
Jul 25 00:08:34ndmkernel: $20   : 00000000 00000006 00000000 82f3fe20
Jul 25 00:08:34ndmkernel: $24   : 0049927c 2aaf73c0                  
Jul 25 00:08:34ndmkernel: $28   : 82f3c000 82f3fda8 82f3fe24 80030a58
Jul 25 00:08:34ndmkernel: Hi    : 0000025b
Jul 25 00:08:34ndmkernel: Lo    : 0002f2b0
Jul 25 00:08:34ndmkernel: epc   : 80031708 kmap_coherent+0x8/0xac     Tainted: P      
Jul 25 00:08:34ndmkernel: ra    : 80030a58 __flush_anon_page+0x4c/0x84
Jul 25 00:08:34ndmkernel: Status: 11000303    KERNEL EXL IE 
Jul 25 00:08:34ndmkernel: Cause : 50807c34
Jul 25 00:08:34ndmkernel: PrId  : 00019555
Jul 25 00:08:34ndmkernel: Modules linked in: hw_nat(P) esp4 igmpsn(P) rt539x_ap5(P) rt539x_ap2(P) ntc(P) fastvpn snd_pcm_oss snd_usb_audio snd_pcm snd_usbmidi_lib ip6t_rt rndis_host hmac nfsd snd_hwdep ip_set_ipportnethash nf_nat_rtsp nfs ip_set_macipmap snd_mixer_oss ip_set_ipportiphash ip_set_portmap dm9601 snd_rawmidi arptable_filter ip6table_raw lockd ip6t_ipv6header cdc_ether nf_nat_sip ip6t_LOG ip_set_ipporthash ip_set_iptree snd_seq_device ip_set_setlist ip6table_filter snd_timer ip6t_ah ip_set_ipmap asix xcbc snd ip6t_frag nf_nat_ftp ext3 ipt_set ip_set_nethash uvcvideo ip6table_mangle ip_set_iptreemap ip_set_iphash nf_nat_pptp nf_nat_h323 ipt_SET nf_conntrack_pptp ip6t_hbh sch_tbf ip_set cls_tcindex ip6t_mh sch_red resetnds(P) thfsplus mtdoops_proc xfrm4_mode_beet tun cls_u32 act_ipt nf_conntrack_ipv6 raeth ext2 cls_basic crypto_hash nf_conntrack_h323 ip6_tables hw_cdc_net ip6t_owner pptp sierra sunrpc pppol2tp usbnet act_pedit sch_sfq sch_gred tfat(P) jbd xfrm_user deflate nf_conntrack_p [...]
Jul 25 00:08:34ndmkernel: Process pidof (pid: 2295, threadinfo=82f3c000, task=87e7f800)
Jul 25 00:08:34ndmkernel: Stack : 88274320 0000000e 0000000b 8137e000 7f999faf 8007f0c4 00000044 82f3fec8
Jul 25 00:08:34ndmkernel:         8032c220 80094ff0 00000010 0000000e 00000000 0000000b 7f999faf 86ae0000
Jul 25 00:08:34ndmkernel:         80363000 00000000 00001000 80000000 00000001 8007f248 81237400 80363000
Jul 25 00:08:34ndmkernel:         8032bf98 00000001 00000000 00000001 82f3fe24 82f3fe20 00000000 811c7be0
Jul 25 00:08:34ndmkernel:         80363034 00002001 00000000 80363000 0000000b 00001000 86ae0000 82f3ff10
Jul 25 00:08:34ndmkernel:         ...
Jul 25 00:08:34ndmkernel: Call Trace:
Jul 25 00:08:34ndmkernel: [<80031708>] kmap_coherent+0x8/0xac
Jul 25 00:08:34ndmkernel: [<80030a58>] __flush_anon_page+0x4c/0x84
Jul 25 00:08:34ndmkernel: [<8007f0c4>] get_user_pages+0x274/0x2ec
Jul 25 00:08:34ndmkernel: [<8007f248>] access_process_vm+0x10c/0x200
Jul 25 00:08:34ndmkernel: [<800cee50>] proc_pid_cmdline+0x70/0x120
Jul 25 00:08:34ndmkernel: [<800d0034>] proc_info_read+0xd4/0x114
Jul 25 00:08:34ndmkernel: [<80094720>] vfs_read+0xc0/0x14c
Jul 25 00:08:34ndmkernel: [<800948d4>] sys_read+0x58/0xc0
Jul 25 00:08:34ndmkernel: [<8002f7a4>] stack_done+0x20/0x3c
Jul 25 00:08:34ndmkernel: 
Jul 25 00:08:34ndmkernel: 
Jul 25 00:08:34ndmkernel: Code: 00000000  8c820000  7c420240 <00028036> 8f820014  3c038037  7ca51300  24420001  af820014 

куда копать господа?

а, да zyxel keenetic ultra ndms v2.06(AAGJ.4)C2

Link to comment
Share on other sites

/opt/etc/lighttpd/certs # lighttpd -t -f /opt/etc/lighttpd/lighttpd.conf
2017-07-25 00:07:05: (configfile.c.1154) source: /opt/etc/lighttpd/conf.d/30-fastcgi.conf line: 61 pos: 1 parser failed somehow near here: /rails/someapp/public/dispatch.fcgi
2017-07-25 00:07:05: (configfile.c.1154) source: /opt/etc/lighttpd/lighttpd.conf line: 31 pos: 1 parser failed somehow near here: (EOL)
/opt/etc/lighttpd/certs # /opt/etc/init.d/S80lighttpd start
 Starting lighttpd... Segmentation fault

 /opt/etc/init.d/S80lighttpd start
 Starting lighttpd...              failed.

а вот это выдает при попытке проверить конфиг

Edited by Razoon
Link to comment
Share on other sites

@Razoon , "облако" поднималось на Giga2 ("собрат" Ultra) c прошивкой 2.09 и системой Entware-3x...

Проверю (позже) на 2.06 с Entware-Keenetic

Link to comment
Share on other sites

5 часов назад, TheBB сказал:

@Razoon , "облако" поднималось на Giga2 ("собрат" Ultra) c прошивкой 2.09 и системой Entware-3x...

Проверю (позже) на 2.06 с Entware-Keenetic

кстати, файловая системе на носителе ntfs, мб в этом проблема? Попробую сначала на ext3 перенакатить.

Link to comment
Share on other sites

  • 1 month later...
3 часа назад, ukr0p сказал:

А возможно настроить owncloud? чтобы доступ был через keenDNS (через облако) ?

теоретически - можно, практически - надо проверять...

Link to comment
Share on other sites

5 часов назад, ukr0p сказал:

А возможно настроить owncloud? чтобы доступ был через keenDNS (через облако) ?

Можно. Owncloud висит через lighttpd на определенном порту. В настройках KeenDNS добавляется доступ через этот порт. И необходимо в конфиге owncloud отметить разрешение входить с этого адреса. Так работает у меня уже несколько месяцев.

Конфиг lighttpd:

Скрытый текст

server.document-root        = "/opt/share/www/owncloud"
server.upload-dirs          = ( "/tmp" )
server.errorlog             = "/opt/var/log/lighttpd/error.log"
server.pid-file             = "/opt/var/run/lighttpd.pid"
#server.username             = "http"
#server.groupname            = "www-data"

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm",
                              )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

### Options that are useful but not always necessary:
#server.chroot               = "/"
server.port                 = 86
#server.bind                 = "localhost"
#server.tag                  = "lighttpd"
#server.errorlog-use-syslog  = "enable"
server.network-backend      = "writev"

### Use IPv6 if available
#include_shell "/opt/share/lighttpd/use-ipv6.pl"

#dir-listing.encoding        = "utf-8"
#server.dir-listing          = "enable"

include "/opt/etc/lighttpd/mime.conf"
include "/opt/etc/lighttpd/conf.d/*.conf"

$HTTP["url"] =~ "^/data/" {
url.access-deny = ("")
}
$HTTP["url"] =~ "^/($|/)" {
dir-listing.activate = "disable"
}


$HTTP["scheme"] == "https" {
    setenv.add-response-header  = ( "Strict-Transport-Security" => "max-age=63072000; includeSubdomains; ")
}

#ssl
$SERVER["socket"] == ":486" {
    ssl.engine = "enable"
    ssl.pemfile = "/opt/etc/lighttpd/certs/lighttpd.pem"

    # enforce strong cypher
    ssl.use-sslv2 = "disable"
    ssl.cipher-list = "TLSv1+HIGH !SSLv2 RC4+MEDIUM !aNULL !eNULL !3DES @STRENGTH"
}

 

Edited by Lordmaster
Link to comment
Share on other sites

 

http://192.168.1.1:86/

No input file specified.

2017-08-31 21:24:37: (log.c.217) server started 
2017-08-31 21:24:37: (server.c.1295) WARNING: unknown config-key: url.access-deny (ignored) 
2017-08-31 21:24:37: (server.c.1295) WARNING: unknown config-key: setenv.add-response-header (ignored) 

Может неверны настройки owcloud?

overwrite.cli.url' => 'https://192.168.1.1/',

Edited by ukr0p
Link to comment
Share on other sites

10 часов назад, ukr0p сказал:

 

http://192.168.1.1:86/

No input file specified.

2017-08-31 21:24:37: (log.c.217) server started 
2017-08-31 21:24:37: (server.c.1295) WARNING: unknown config-key: url.access-deny (ignored) 
2017-08-31 21:24:37: (server.c.1295) WARNING: unknown config-key: setenv.add-response-header (ignored) 

Может неверны настройки owcloud?

overwrite.cli.url' => 'https://192.168.1.1/',

1) Это откуда строки?

2) В конфиге owncloud должны быть строки:

  'trusted_domains' =>
  array (
    0 => '192.168.178.1:86',
    1 => '192.168.178.1:486',
    2 => 'xxx.xxx.mykeenetic.net', #заменить на KeenDNS свой
),

3) overwrite.cli.url' как я видел переписывается сама собой, ее не трогал никогда.

4) Сам owncloud находится по адресу /opt/share/www/owncloud ?

Edited by Lordmaster
Link to comment
Share on other sites

Спасибо Вам за ответы !!!

Да, адрес owncloud такой /opt/share/www/owncloud 

Конфиг lighttpd.conf

server.document-root        = "/opt/share/www/owncloud"
server.upload-dirs          = ( "/tmp" )
server.errorlog             = "/opt/var/log/lighttpd/error.log"
server.pid-file             = "/opt/var/run/lighttpd.pid"
#server.username             = "http"
#server.groupname            = "www-data"

index-file.names            = ( "index.php", "index.html",
                                "index.htm", "default.htm",
                              )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

### Options that are useful but not always necessary:
#server.chroot               = "/"
server.port                 = 81
#server.bind                 = "localhost"
#server.tag                  = "lighttpd"
#server.errorlog-use-syslog  = "enable"
server.network-backend      = "writev"

### Use IPv6 if available
#include_shell "/opt/share/lighttpd/use-ipv6.pl"

#dir-listing.encoding        = "utf-8"
#server.dir-listing          = "enable"

include "/opt/etc/lighttpd/mime.conf"
include "/opt/etc/lighttpd/conf.d/*.conf"

$HTTP["url"] =~ "^/data/" {
url.access-deny = ("")
}
$HTTP["url"] =~ "^/($|/)" {
dir-listing.activate = "disable"
}

#ssl
$SERVER["socket"] == ":443" {
    ssl.engine = "enable"
    ssl.pemfile = "/opt/etc/lighttpd/certs/lighttpd.pem"

    # enforce strong cypher
    ssl.use-sslv2 = "disable"
    ssl.cipher-list = "TLSv1+HIGH !SSLv2 RC4+MEDIUM !aNULL !eNULL !3DES @STRENGTH"
}

 

Конфиг owncloud

config.php

<?php
$CONFIG = array (
  'instanceid' => 'ockkobz8u8cv',
  'passwordsalt' => 'AnmLjqG74c070sWAoybsDTAG5N0geB',
  'secret' => 'ZCXLYPhVEcdHy+zoslR37IX3Uec8acbm/q9/ioue1fR6yxyO',
  'trusted_domains' => 
  array (
    0 => '192.168.1.1',
    1 => '192.168.1.1:81',
    2 => '192.168.1.1:443',
    3 => 'xxx.xxxxx.mykeenetic.ru',  //мой адрес в keenDNS
  ),
  'datadirectory' => '/tmp/mnt/MediaStorage/owncloud/data',
  'overwrite.cli.url' => 'https://192.168.1.1/owncloud',
  'dbtype' => 'sqlite3',
  'version' => '10.0.2.1',
  'logtimezone' => 'UTC',
  'installed' => true,
);
 

 

 

 

Edited by ukr0p
Опечатка
Link to comment
Share on other sites

  • 2 weeks later...

Друзья, подскажите, после установки по данной инструкции аппарат Omni II способен вывозить OwnCloud?

Один раз пробовал его поставить примерно с год назад, так он был неописуемо медлительным

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...