LINUX.ORG.RU

Сообщения evybwf

 

Nginx 1.14 + php7.3-fpm

Форум — General

На Ubuntu 18.04 поставил Nginx 1.14.2, по инструкции с официального сайта. Поставил php7.3-fpm из репы ondrej/php. В /etc/php/7.3/fpm/pool.d/www.conf изменил listen = /run/php/php7.3-fpm.sock на listen = 127.0.0.1:9000, в nginx.conf изменил пользователя на www-data (как у php-fpm). Изменил default.conf на:

server {
    listen       80;
    server_name  localhost;
    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
    location ~ \.php$ {
        root           html;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
        include        fastcgi_params;
    }
}
root@abcde:/# netstat -anp | grep 9000
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      11868/php-fpm: mast 
root@abcde:/# ps -aux | grep php
root     11868  0.0 10.9 384300 25752 ?        Ss   14:05   0:00 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
www-data 11869  0.0  5.0 386600 11920 ?        S    14:05   0:00 php-fpm: pool www
www-data 11870  0.0  5.7 386732 13528 ?        S    14:05   0:00 php-fpm: pool www
root     11875  0.0  0.4  14428  1104 pts/1    S+   14:08   0:00 grep --color=auto php
root@abcde:/# ps -aux | grep nginx
root     11862  0.0  0.3  33308   896 ?        Ss   14:05   0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
www-data 11864  0.0  1.8  38108  4248 ?        S    14:05   0:00 nginx: worker process
root     11877  0.0  0.4  14428  1084 pts/1    S+   14:08   0:00 grep --color=auto nginx
В index.html добавил строку
<?php
  echo "Hello World!";
?>
и создал в одной директории с index.html test.php
<?php var_export($_SERVER)?>
Но, при попытке исполнить(открыть в браузере) test.php получаю пустую страницу, а в логах nginx:
2018/12/29 13:56:16 [error] 11838#11838: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 100.100.1.1, server: localhost, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "111.111.222.222"
а при открытии index.html вместо Hello, World! получаю Hello, World!"; ?>

 , ,

evybwf
()

Подмена DNS у клиентов VPN

Форум — General

Есть VPN сервер, к которому подключаются клиенты с различных устройств через wg0 интерфейс. Среди них есть с ОС Android/iOS, работающие через сотовую сеть. В этих системах менять DNS сервера почти невозможно, поэтому возникает вопрос, как можно прозрачно подменять ответы или вынуждать клиентов использовать наш DNS?

 , ,

evybwf
()

Установка policycoreutils-python в CentOS 6.7

Форум — General

Пытаюсь установить policycoreutils-python.

yum -y install policycoreutils-python
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.hustunique.com
 * epel: mirror.yandex.ru
 * extras: mirrors.hustunique.com
 * updates: mirrors.hustunique.com
Resolving Dependencies
--> Running transaction check
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: libsemanage-python >= 2.0.43-4 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: audit-libs-python >= 1.4.2-1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: setools-libs-python for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: libselinux-python for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.3.7-5.el6 will be installed
---> Package libcgroup.x86_64 0:0.40.rc1-15.el6_6 will be installed
---> Package libselinux-python.x86_64 0:2.0.94-5.8.el6 will be installed
---> Package libsemanage-python.x86_64 0:2.0.43-4.2.el6 will be installed
--> Processing Dependency: libsemanage = 2.0.43-4.2.el6 for package: libsemanage-python-2.0.43-4.2.el6.x86_64
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
---> Package setools-libs-python.x86_64 0:3.3.7-4.el6 will be installed
--> Processing Dependency: setools-libs = 3.3.7-4.el6 for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libsefs.so.4(VERS_4.0)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libseaudit.so.4(VERS_4.2)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libseaudit.so.4(VERS_4.1)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.3)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libpoldiff.so.1(VERS_1.3)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libpoldiff.so.1(VERS_1.2)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.1)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libsefs.so.4()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libseaudit.so.4()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libpoldiff.so.1()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Running transaction check
---> Package libsemanage.i686 0:2.0.43-4.2.el6 will be installed
--> Processing Dependency: libustr-1.0.so.1(USTR_1.0.1) for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libustr-1.0.so.1(USTR_1.0) for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libustr-1.0.so.1 for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libsepol.so.1 for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libselinux.so.1 for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libc.so.6(GLIBC_2.8) for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libbz2.so.1 for package: libsemanage-2.0.43-4.2.el6.i686
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
---> Package setools-libs.x86_64 0:3.3.7-4.el6 will be installed
--> Running transaction check
---> Package bzip2-libs.i686 0:1.0.5-7.el6_0 will be installed
---> Package glibc.i686 0:2.12-1.149.el6_6.5 will be installed
--> Processing Dependency: glibc-common = 2.12-1.149.el6_6.5 for package: glibc-2.12-1.149.el6_6.5.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.149.el6_6.5.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.149.el6_6.5.i686
---> Package libselinux.i686 0:2.0.94-5.8.el6 will be installed
---> Package libsepol.i686 0:2.0.41-4.el6 will be installed
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
---> Package ustr.i686 0:1.0.4-9.1.el6 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.12-1.149.el6_6.5 will be installed
--> Processing Dependency: glibc-common = 2.12-1.149.el6_6.5 for package: glibc-2.12-1.149.el6_6.5.i686
---> Package nss-softokn-freebl.i686 0:3.14.3-22.el6_6 will be installed
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Finished Dependency Resolution
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
yum -y --skip-broken install policycoreutils-python
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.hustunique.com
 * epel: ftp.colocall.net
 * extras: mirrors.hustunique.com
 * updates: mirrors.hustunique.com
Resolving Dependencies
--> Running transaction check
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: libsemanage-python >= 2.0.43-4 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: audit-libs-python >= 1.4.2-1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: setools-libs-python for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: libselinux-python for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.3.7-5.el6 will be installed
---> Package libcgroup.x86_64 0:0.40.rc1-15.el6_6 will be installed
---> Package libselinux-python.x86_64 0:2.0.94-5.8.el6 will be installed
---> Package libsemanage-python.x86_64 0:2.0.43-4.2.el6 will be installed
--> Processing Dependency: libsemanage = 2.0.43-4.2.el6 for package: libsemanage-python-2.0.43-4.2.el6.x86_64
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
---> Package setools-libs-python.x86_64 0:3.3.7-4.el6 will be installed
--> Processing Dependency: setools-libs = 3.3.7-4.el6 for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libsefs.so.4(VERS_4.0)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libseaudit.so.4(VERS_4.2)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libseaudit.so.4(VERS_4.1)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.3)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libpoldiff.so.1(VERS_1.3)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libpoldiff.so.1(VERS_1.2)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.1)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libsefs.so.4()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libseaudit.so.4()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libpoldiff.so.1()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: setools-libs-python-3.3.7-4.el6.x86_64
--> Running transaction check
---> Package libsemanage.i686 0:2.0.43-4.2.el6 will be installed
--> Processing Dependency: libustr-1.0.so.1(USTR_1.0.1) for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libustr-1.0.so.1(USTR_1.0) for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libustr-1.0.so.1 for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libsepol.so.1 for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libselinux.so.1 for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libc.so.6(GLIBC_2.8) for package: libsemanage-2.0.43-4.2.el6.i686
--> Processing Dependency: libbz2.so.1 for package: libsemanage-2.0.43-4.2.el6.i686
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
---> Package setools-libs.x86_64 0:3.3.7-4.el6 will be installed
--> Running transaction check
---> Package bzip2-libs.i686 0:1.0.5-7.el6_0 will be installed
---> Package glibc.i686 0:2.12-1.149.el6_6.5 will be installed
--> Processing Dependency: glibc-common = 2.12-1.149.el6_6.5 for package: glibc-2.12-1.149.el6_6.5.i686
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.12-1.149.el6_6.5.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.12-1.149.el6_6.5.i686
---> Package libselinux.i686 0:2.0.94-5.8.el6 will be installed
---> Package libsepol.i686 0:2.0.41-4.el6 will be installed
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64
---> Package ustr.i686 0:1.0.4-9.1.el6 will be installed
--> Running transaction check
---> Package glibc.i686 0:2.12-1.149.el6_6.5 will be installed
--> Processing Dependency: glibc-common = 2.12-1.149.el6_6.5 for package: glibc-2.12-1.149.el6_6.5.i686
---> Package nss-softokn-freebl.i686 0:3.14.3-22.el6_6 will be installed
---> Package policycoreutils-python.x86_64 0:2.0.83-19.47.el6_6.1 will be installed
--> Processing Dependency: policycoreutils = 2.0.83-19.47.el6_6.1 for package: policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64

Packages skipped because of dependency problems:
    audit-libs-python-2.3.7-5.el6.x86_64 from base
    bzip2-libs-1.0.5-7.el6_0.i686 from base
    glibc-2.12-1.149.el6_6.5.i686 from updates
    libcgroup-0.40.rc1-15.el6_6.x86_64 from updates
    libselinux-2.0.94-5.8.el6.i686 from base
    libselinux-python-2.0.94-5.8.el6.x86_64 from base
    libsemanage-2.0.43-4.2.el6.i686 from base
    libsemanage-python-2.0.43-4.2.el6.x86_64 from base
    libsepol-2.0.41-4.el6.i686 from base
    nss-softokn-freebl-3.14.3-22.el6_6.i686 from updates
    policycoreutils-python-2.0.83-19.47.el6_6.1.x86_64 from updates
    setools-libs-3.3.7-4.el6.x86_64 from base
    setools-libs-python-3.3.7-4.el6.x86_64 from base
    ustr-1.0.4-9.1.el6.i686 from base
Так-же не помогло
rpm -Va --nofiles --nodigest
Что делать?

 , , ,

evybwf
()

Deluge web интерфейс

Форум — Desktop

Как в deluge разрешить подключаться к веб интерфейсу(Web UI) только из локальной сети(192.168.1.*), а не с любого ip? Т.е. чтобы web интерфейс принимал соединения только с сетевой карты направленной в локальную сеть(192.168.1.1), а не в интернет.

 ,

evybwf
()

Получить cookies с помощью wget.

Форум — General

Пытаюсь получить cookies с этого сайта командой

wget --save-cookies cookies --post-data 'username=prosto&password=111111' https://learningapps.org/login.php
но получаю только пустой файл cookies(только закомментированные строки в нём). В чём проблема?

 , ,

evybwf
()

Получить страницу сайта.

Форум — General

Имеется сайт, нужно получить страницу(из консоли), например эту. Но, вместо страницы получаю такую штуку

<html><head></head> 
	<body>
		<script> 
			var xmlhttp = new XMLHttpRequest(); 
			function eraseCookieFromAllPaths(name) { var pathBits = location.pathname.split("/");var pathCurrent = " path=";document.cookie = name + "=; expires=Thu, 01-Jan-1970 00:00:01 GMT;";for (var i = 0; i < pathBits.length; i++) {pathCurrent += ((pathCurrent.substr(-1) != "/") ? "/" : "") + pathBits[i]; 
			document.cookie = name + "=; expires=Thu, 01-Jan-1970 00:00:01 GMT;" + pathCurrent + ";";}} 
			eraseCookieFromAllPaths("BHC"); 
			xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { var a=xmlhttp.responseText;document.cookie="BHC="+a+"; path=/";document.location.href="/dl.php?id=80687"; } }; 
			xmlhttp.open("GET", "/banhammer/pid", true);xmlhttp.send(); 
		</script> 
	</body></html>
Как побороть это?

 , , , ,

evybwf
()

RSS подписка на новые темы