Re: Ошибка при отправке письма из PHP

2018-05-21 Thread Iurii Medvedev
Это никак не связано с nginx

On Mon, May 21, 2018 at 5:12 PM warma2d <nginx-fo...@forum.nginx.org> wrote:

> Добрый день!
>
> Проблема в том, что при попытке отправить письмо из единственного PHP
> скрипта index.php (который расположен /home/rima/www/public) не
> отправляется
> письмо даже стандартной функцией mail(), var_dump возвращает false.
>
> При этом установлен Sendmail, Nginx, php как fpm. Для сайта создан
> отдельный
> пул с chroot.
> (Принимать письма не требуется, главное отправлять.)
>
> Поскольку сайт работает через chroot, то его sendmail лежит здесь
> /home/rima/www/usr/sbin/
> Даже через него напрямую из консоли ./sendmail можно спокойно отправить
> тестовое письмо, но из самого php скрипта не не удается. Всему каталогу с
> сайтом, директориями и файлам заданы полные права (777).
>
> mail.log выдаёт:
> [21-May-2018 07:31:33 America/New_York] mail() on [/public/index.php:7]:
> To:
> warm...@ya.ru -- Headers:
>
> На тему mail кроме этого лога нигде никакие логи не увидеть.
>
> Подскажите пожалуйста что-нибудь по данному вопросу ?
>
> Заранее спасибо !
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?21,279882,279882#msg-279882
>
> ___
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru

-- 
With best wishes
Iurii Medvedev
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: Nginx + php-fpm

2018-03-29 Thread Iurii Medvedev
В нехватке памяти, нужно проверить настройки php, nginx тут не причём

On Thu, Mar 29, 2018 at 6:27 PM Goti <nginx-fo...@forum.nginx.org> wrote:

> Всем привет, php жрет всю память, не могу понять почему ...
> Конфиг:
> server {
> listen 80 default_server;
> listen [::]:80 default_server;
>
> server_name _;
>
> location / {
> root /var/www/html/dist/;
> }
>
> location /search/ {
> proxy_method GET;
> proxy_pass http://172.18.0.4:9200/index/index/_search$args
> ;
> }
>
> location ~ /api/(.+)$ {
> fastcgi_pass unix:/run/php/php7.1-fpm.sock;
>
> include fastcgi_params;
> fastcgi_param SCRIPT_FILENAME
> /var/www/html/backend/web/app.php;
> fastcgi_param  SCRIPT_NAME /app.php;
> fastcgi_param  REQUEST_URI /$uri?$args;
> }
> }
>
>
>
> Вот лог:
> 2018/03/29 13:26:53 [error] 295#295: *3 FastCGI sent in stderr: "PHP
> message: PHP Fatal error:  Allowed memory size of 1073741824 bytes
> exhausted
> (tried to allocate 20480 bytes) in
>
> /var/www/html/backend/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
> on line 107
> PHP message: PHP Fatal error:  Allowed memory size of 1073741824 bytes
> exhausted (tried to allocate 20480 bytes) in
>
> /var/www/html/backend/vendor/symfony/symfony/src/Symfony/Component/Debug/ErrorHandler.php
> on line 626" while reading response header from upstream, client:
> 127.0.0.1,
> server: _, request: "GET /api/user/login-check HTTP/1.1", upstream:
> "fastcgi://unix:/run/php/php7.1-fpm.sock:", host: "localhost"
>
>
>
> В чем может быть проблема ?
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?21,279235,279235#msg-279235
>
> ___
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru

-- 
With best wishes
Iurii Medvedev
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf

2017-11-09 Thread Iurii Medvedev
Проблем нет с исходящим трафиком? Я так понимаю у вас там летскрипт

On Nov 9, 2017 17:36, "Gena Makhomed"  wrote:

On 09.11.2017 15:41, Илья Шипицин wrote:

в момент запуска nginx доступен ресолвер ?
>>
>
В конфиге у меня ресолвер вот так прописан:

ssl_stapling on;
resolver 8.8.8.8 8.8.4.4 ipv6=off;

Да, вполне может быть и так, что не были доступны ресолверы,
иначе я не знаю чем еще объяснить, почему проверка конфига

$ nginx -T | grep "server {" | wc -l
21

$ nginx -T | grep "ssl_certificate_key" | wc -l
7

заняла более 90 секунд. Доступ ко всем бекендам прописан
через статические IP внутренней сети, там ресолвер не используется:

proxy_pass http://172.22.22.121/;

Ресолвер в конфиге я включал только из-за директивы "ssl_stapling on".

Но ведь ssl_stapling - это дополнительная функциональность,
nginx же вполне может запуститься и работать вообще без ssl_stapling.

Тем более, что это был даже не запуск nginx, а просто проверка конфига.

Может быть во время проверки конфига на валидность имеет смысл
вообще не ждать по 90 секунд неизвестно чего из-за директивы
"ssl_stapling on" ?




On 09.11.2017 15:50, Andrey Oktyabrskiy wrote:

Вопрос-то не об этом. А о том, почему [warn] истолковывается как фатальная
> ошибка.
>

Это не из-за warn, это из-за таймаута.

У systemd дефолтовый таймаут на старт юнита - 90 секунд.
Он был превышен, поэтому "Unit nginx.service entered failed state".

-- 
Best regards,
 Gena


___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf

2017-11-09 Thread Iurii Medvedev
Смысл это . строчки как раз и проверить конфигурацию перед стартом.
https://www.nginx.com/resources/wiki/start/topics/examples/systemd/
И это правильно.

9 ноября 2017 г., 16:03 пользователь Gena Makhomed <g...@csdoc.com> написал:

> On 09.11.2017 14:55, Iurii Medvedev wrote:
>
> ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf  это всего лишь
>> тест конфигурации
>>
>
> Спасибо, я знаю что это такое.
>
> и он у вас провалился
>>
>
> Нет. С конфигурацией все нормально, после того как вручную сделал
> systemctl restart nginx - все поднялось.
>
> В конфиге ничего не правил.
>
> systemd отказался запускать юнит, потому что команда
> из строчки ExecStartPre= очень долго отрабатывала,
> в логе об этом же написано.
>
>
> --
> Best regards,
>  Gena
>
> ___
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
>



-- 
With best regards
Iurii Medvedev
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf

2017-11-09 Thread Iurii Medvedev
ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf  это всего лишь
тест конфигурации и он у вас провалился

9 ноября 2017 г., 15:51 пользователь Gena Makhomed <g...@csdoc.com> написал:

> Здравствуйте, All!
>
> В чем смысл директивы
>
> ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf
>
> в файле /usr/lib/systemd/system/nginx.service ?
>
> У меня из-за этой фигни nginx не поднялся после того,
> как сервер перезапустился. В логах вот такая запись:
>
> Nov 09 13:26:30 example.com nginx[851]: nginx: [warn] "ssl_stapling"
> ignored, host not found in OCSP responder "ocsp.int-x3.letsencrypt.org"
> in the certificate "/etc/letsencrypt/live/example.net/fullchain.pem"
> Nov 09 13:26:51 example.com nginx[851]: nginx: [warn] "ssl_stapling"
> ignored, host not found in OCSP responder "ocsp.int-x3.letsencrypt.org"
> in the certificate "/etc/letsencrypt/live/example.net/fullchain.pem"
> Nov 09 13:27:11 example.com nginx[851]: nginx: [warn] "ssl_stapling"
> ignored, host not found in OCSP responder "ocsp.int-x3.letsencrypt.org"
> in the certificate "/etc/letsencrypt/live/example.net/fullchain.pem"
> Nov 09 13:27:31 example.com nginx[851]: nginx: [warn] "ssl_stapling"
> ignored, host not found in OCSP responder "ocsp.int-x3.letsencrypt.org"
> in the certificate "/etc/letsencrypt/live/example.net/fullchain.pem"
> Nov 09 13:27:40 example.com systemd[1]: nginx.service start-pre operation
> timed out. Terminating.
> Nov 09 13:27:40 example.com systemd[1]: Failed to start nginx - high
> performance web server.
> Nov 09 13:27:40 example.com systemd[1]: Unit nginx.service entered failed
> state.
> Nov 09 13:27:40 example.com systemd[1]: nginx.service failed.
>
> После того как вручную сделал systemctl restart nginx - все поднялось.
>
> Может быть имеет смысл убрать строчку
>
> ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/nginx.conf
>
> из файла /usr/lib/systemd/system/nginx.service ?
>
> Ведь никаких проблем эта строка ExecStartPre= не решает,
> а только создает новые.
>
> Или я ошибаюсь, и для чего-то эта строчка ExecStartPre= там нужна?
>
> Для чего?
>
> --
> Best regards,
>  Gena
>
> ___
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru




-- 
With best regards
Iurii Medvedev
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: streaming video to mobile phones

2017-11-02 Thread Iurii Medvedev
You can use nginx as video streaming server. Its mean you can push or pull
to/from nginx. Create hls playlist and your player can stream video.

On Nov 2, 2017 22:01, "Anthony Griffiths"  wrote:

> On Thu, Nov 2, 2017 at 6:52 PM, Roman Arutyunyan  wrote:
> > Hi Anthony,
> >
> > On Thu, Nov 02, 2017 at 04:29:04PM +, Anthony Griffiths wrote:
> >> I'm running nginx-1.12.2 on a centos 6 server and I've had success
> >> with it streaming live video to a mobile phone. I followed the
> >> instructions here:
> >> https://www.vultr.com/docs/setup-nginx-on-ubuntu-to-
> stream-live-hls-video
> >> this page uses mpegurl m3u8 as the streaming protocol. My question is
> >> are there any other protocols that work with mobile phones?
> >
> > Any protocol can work with mobile phones once you get the right
> application
> > to play it.  HLS (which you called "megurl m3u8") is widely adopted on
> mobile
> > platforms, so it's a good choice.
>
> thanks but there are several applications in a chain to stream video. Mine
> is:
> video source --> ffmpeg --> broadcast server (nginx) --> web player
> (flowplayer embedded in html5)
> which part of the chain would you be referring to for the right
> application??
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread Iurii Medvedev
Try to change pm.max_requests up to 2048.
To much pm.max_children = 400

2017-10-16 20:52 GMT+03:00 agriz <nginx-fo...@forum.nginx.org>:

> Reduced to 4k visitors from 10k :(
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,276892,276898#msg-276898
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 
With best regards
Iurii Medvedev
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: E3-1240 with 32GB Ram - Unable to set the optimal value for the server

2017-10-16 Thread Iurii Medvedev
How many core do you have?

On Oct 16, 2017 19:37, "agriz"  wrote:

> I am struggling to handle a traffic of 10K+ It will reach a lot. But my bad
> configuration is limiting them.
>
> www.conf
>
> pm.max_children = 400
> pm.start_servers = 40
> pm.min_spare_servers = 40
> pm.max_spare_servers = 70
> pm.max_requests = 800
>
> nginx.conf
>
> worker_processes  3;
> events {
> worker_connections  8096;
> accept_mutex on;
> accept_mutex_delay 500ms;
> multi_accept on;
> use epoll;
> }
>
> sendfileon;
> tcp_nodelay on;
> tcp_nopush on;
>
>
> client_body_buffer_size 128K;
> client_max_body_size 8m;
>
> client_body_timeout 15;
> client_header_timeout 15;
> send_timeout 10;
> keepalive_timeout  15;
>
> open_file_cache max=5000 inactive=20s;
> open_file_cache_valid 60s;
> open_file_cache_min_uses 4;
> open_file_cache_errors on;
>
> If i change the values, it hangs with 3k or 5k visitors.
> This one handle 5k to 8k
>
> But cpu and ram are available in server.
> Quad core and 32GB Ram SSD
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?2,276892,276892#msg-276892
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: Ошибки при установке NGINX

2017-08-17 Thread Iurii Medvedev
Как раз в логе все написано" Address already in use"

17 авг. 2017 г. 23:14 пользователь "Andrey_Bushman" <
nginx-fo...@forum.nginx.org> написал:

> Вывод обозначенных команд мне не сильно помог:
>
> root@bimpack:~# systemctl status nginx.service
> ● nginx.service - A high performance web server and a reverse proxy server
>Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor
> preset: enabled)
>Active: failed (Result: exit-code) since Thu 2017-08-17 15:53:41 EDT;
> 16min ago
>   Process: 15842 ExecStart=/usr/sbin/nginx -g daemon on; master_process on;
> (code=exited, status=1/FAILURE)
>   Process: 15839 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on;
> master_process on; (code=exited, status=0/SUCCESS)
>
> Aug 17 15:53:39 vds nginx[15842]: nginx: [emerg] bind() to 0.0.0.0:80
> failed
> (98: Address already in use)
> Aug 17 15:53:39 vds nginx[15842]: nginx: [emerg] bind() to 0.0.0.0:80
> failed
> (98: Address already in use)
> Aug 17 15:53:40 vds nginx[15842]: nginx: [emerg] bind() to 0.0.0.0:80
> failed
> (98: Address already in use)
> Aug 17 15:53:40 vds nginx[15842]: nginx: [emerg] bind() to 0.0.0.0:80
> failed
> (98: Address already in use)
> Aug 17 15:53:41 vds nginx[15842]: nginx: [emerg] bind() to 0.0.0.0:80
> failed
> (98: Address already in use)
> Aug 17 15:53:41 vds nginx[15842]: nginx: [emerg] still could not bind()
> Aug 17 15:53:41 vds systemd[1]: nginx.service: Control process exited,
> code=exited status=1
> Aug 17 15:53:41 vds systemd[1]: Failed to start A high performance web
> server and a reverse proxy server.
> Aug 17 15:53:41 vds systemd[1]: nginx.service: Unit entered failed state.
> Aug 17 15:53:41 vds systemd[1]: nginx.service: Failed with result
> 'exit-code'.
> root@bimpack:~#
>
> root@bimpack:~# journalctl -xe
> Aug 17 16:09:30 vds sshd[16000]: error: maximum authentication attempts
> exceeded for root from 42.7.26.91 port 48424 ssh2 [preauth]
> Aug 17 16:09:30 vds sshd[16000]: Disconnecting: Too many authentication
> failures [preauth]
> Aug 17 16:09:30 vds sshd[16000]: PAM 5 more authentication failures;
> logname= uid=0 euid=0 tty=ssh ruser= rhost=42.7.26.91  user=root
> Aug 17 16:09:30 vds sshd[16000]: PAM service(sshd) ignoring max retries; 6
> >
> 3
> Aug 17 16:09:32 vds sshd[16002]: pam_unix(sshd:auth): authentication
> failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=42.7.26.91  user=root
> Aug 17 16:09:34 vds sshd[16002]: Failed password for root from 42.7.26.91
> port 9055 ssh2
> Aug 17 16:09:37 vds sshd[16002]: Failed password for root from 42.7.26.91
> port 9055 ssh2
> Aug 17 16:09:39 vds sshd[16002]: Failed password for root from 42.7.26.91
> port 9055 ssh2
> Aug 17 16:09:42 vds sshd[16002]: Failed password for root from 42.7.26.91
> port 9055 ssh2
> Aug 17 16:09:45 vds sshd[16002]: Failed password for root from 42.7.26.91
> port 9055 ssh2
> Aug 17 16:09:48 vds sshd[16002]: Failed password for root from 42.7.26.91
> port 9055 ssh2
> Aug 17 16:09:48 vds sshd[16002]: error: maximum authentication attempts
> exceeded for root from 42.7.26.91 port 9055 ssh2 [preauth]
> Aug 17 16:09:48 vds sshd[16002]: Disconnecting: Too many authentication
> failures [preauth]
> Aug 17 16:09:48 vds sshd[16002]: PAM 5 more authentication failures;
> logname= uid=0 euid=0 tty=ssh ruser= rhost=42.7.26.91  user=root
> Aug 17 16:09:48 vds sshd[16002]: PAM service(sshd) ignoring max retries; 6
> >
> 3
> Aug 17 16:09:50 vds sshd[16005]: pam_unix(sshd:auth): authentication
> failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=42.7.26.91  user=root
> Aug 17 16:09:52 vds sshd[16005]: Failed password for root from 42.7.26.91
> port 32425 ssh2
> Aug 17 16:09:55 vds sshd[16005]: Failed password for root from 42.7.26.91
> port 32425 ssh2
> Aug 17 16:09:58 vds sshd[16005]: Failed password for root from 42.7.26.91
> port 32425 ssh2
> Aug 17 16:10:01 vds sshd[16005]: Failed password for root from 42.7.26.91
> port 32425 ssh2
> Aug 17 16:10:03 vds sshd[16005]: Failed password for root from 42.7.26.91
> port 32425 ssh2
> Aug 17 16:10:07 vds sshd[16005]: Failed password for root from 42.7.26.91
> port 32425 ssh2
> Aug 17 16:10:07 vds sshd[16005]: error: maximum authentication attempts
> exceeded for root from 42.7.26.91 port 32425 ssh2 [preauth]
> Aug 17 16:10:07 vds sshd[16005]: Disconnecting: Too many authentication
> failures [preauth]
> Aug 17 16:10:07 vds sshd[16005]: PAM 5 more authentication failures;
> logname= uid=0 euid=0 tty=ssh ruser= rhost=42.7.26.91  user=root
> Aug 17 16:10:07 vds sshd[16005]: PAM service(sshd) ignoring max retries; 6
> >
> 3
> Aug 17 16:10:09 vds sshd[16009]: pam_unix(sshd:auth): authentication
> failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=42.7.26.91  user=root
> Aug 17 16:10:11 vds sshd[16009]: Failed password for root from 42.7.26.91
> port 57502 ssh2
> Aug 17 16:10:13 vds sshd[16009]: Failed password for root from 42.7.26.91
> port 57502 ssh2
> Aug 17 16:10:15 vds sshd[16009]: Failed password for root from 42.7.26.91
> port 57502 ssh2
> 

Re: Ошибки при установке NGINX

2017-08-17 Thread Iurii Medvedev
Вначале внимательно изучить вывод journalctl -xe
У вас же написано какую команду выполнить чтобы узнать детали

17 авг. 2017 г. 23:01 пользователь "Andrey_Bushman" <
nginx-fo...@forum.nginx.org> написал:

> Доброго времени суток.
>
> Ubuntu-16.04-x86_64 (сервер)
>
> Устанавливаю NGINX:
>
> > apt-get install nginx
>
> Получаю ошибки:
>
> 
>
> Setting up nginx-core (1.10.3-0ubuntu0.16.04.2) ...
> Job for nginx.service failed because the control process exited with error
> code. See "systemctl status nginx.service" and "journalctl -xe" for
> details.
> invoke-rc.d: initscript nginx, action "start" failed.
> dpkg: error processing package nginx-core (--configure):
>  subprocess installed post-installation script returned error exit status 1
> dpkg: dependency problems prevent configuration of nginx:
>  nginx depends on nginx-core (>= 1.10.3-0ubuntu0.16.04.2) | nginx-full (>=
> 1.10.3-0ubuntu0.16.04.2) | nginx-light (>= 1.10.3-0ubuntu0.16.04.2) |
> nginx-extras (>= 1.10.3-0ubuntu0.16.04.2); however:
>   Package nginx-core is not configured yet.
>   Package nginx-full is not installed.
>   Package nginx-light is not installed.
>   Package nginx-extras is not installed.
>  nginx depends on nginx-core (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-full
> (<< 1.10.3-0ubuntu0.16.04.2.1~) | nginx-light (<<
> 1.10.3-0ubuntu0.16.04.2.1~) | nginx-extras (<< 1.10.3-0ubuntu0.16.04.2.1~);
> however:
>   Package nginx-core is not configured yet.
>   Package nginx-full is not installed.
>   Package nginx-light is not installed.
>   Package nginx-extras is not installed.
>
> dpkg: error processing package nginx (--configure):
>  dependency problems - leaving unconfigured
> Errors were encountered while processing:
>  nginx-core
>  nginx
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> 
>
> Как установить nginx?
>
> Спасибо
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?21,276085,276085#msg-276085
>
> ___
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru

Re: Two domains and multiple server blocks

2017-08-12 Thread Iurii Medvedev
https://nginx.ru/en/docs/http/ngx_http_core_module.html#server_name

2017-08-12 16:11 GMT+03:00 Reinis Rozitis <r...@roze.lv>:

> > Please don't use server name like .armapedia.de you should USe fqdn
>
> Unless you care about micro performance gains (as in a bit slower wildcard
> lookups) from configuration point of view it's fine and nothing wrong to
> use .domain.
>
> rr
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 
With best regards
Iurii Medvedev
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

RE: Two domains and multiple server blocks

2017-08-12 Thread Iurii Medvedev
Please don't use server name like .armapedia.de you should USe fqdn

12 авг. 2017 г. 15:58 пользователь "Reinis Rozitis"  написал:

> > Here, whenever I enter www.armapedia.de in my browser, I am redirected
> to
> > armapedia.3jgkp.de. I dont understand this behavior at all. All
> examples about
> > nginx and multiple vhosts with different domains just use the appropriate
> > server_name entries, so I'm really stuck here.
>
> First - I would try to upgrade nginx / you are using quite an old (~3
> years) version 1.6.2.
>
> I don't particularly remember at what point but there have been some
> issues/changes on how nginx handles virtual server priority. At least I've
> seen a similar issue in serving wrong SSL certificates (as in chosing the
> wrong virtual server block / SNI not working as expected) which went away
> after upgrade to a most recent version.
>
> While it may not be the case here it's a good point to start for a better
> support.
>
>
>
> Looking at the response headers for armapedia.de:
>
> Connecting to www.armapedia.de (www.armapedia.de)|88.99.227.139|:80...
> connected.
> HTTP request sent, awaiting response...
>   HTTP/1.1 301 Moved Permanently
>   Server: nginx/1.6.2
>   Date: Sat, 12 Aug 2017 12:48:45 GMT
>   Content-Type: text/html; charset=UTF-8
>   Connection: keep-alive
>   Set-Cookie: wsc30_cookieHash=3fffeb677df909960a434c5f05d66f2007cde491;
> path=/; domain=armapedia.3jgkp.de; HttpOnly
>   Location: http://armapedia.3jgkp.de/
>
>
> There is a cookie for armapedia.3jgkp.de .. which means that the request
> is actually passed to php (also the redirect could come from php not nginx)
> which shouldn’t happen with:
> return 301 https://www.armapedia.de$request_uri;
>
> what again indicates that the request is handled by the first server {}
> block rather than the one you expect.
>
> rr
>
> ___
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Re: Что нужно сделать,чтоб появились права доступа к директории с сайтом через браузер?

2017-07-08 Thread Iurii Medvedev
proxy_pass http://127.0.0.1:8081;
Это как-то не похоже на php-fpm.

8 июля 2017 г., 16:59 пользователь Nadya <nginx-fo...@forum.nginx.org>
написал:

> От домена mysite.ru
>
> server {
> listen   80;
> root /var/www/mysite.ru/;
> index index.html index.htm;
> server_name mysite.ru www.mysite.ru 127.0.0.1;
> }
>   {
> root/var/www/$host_wo_www/www;
> access_log off;
> expires 30d;
> add_header Pragma public;
> add_header Cache-Control public;
>   }
>
>   location / {
> root/var/www/$host_wo_www/www;
> index   index.html index.htm index.php;
> access_log  off;
> proxy_pass http://127.0.0.1:8081;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header Host $host;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>   }
> }
>
> nginx.conf
>
> # Пользователь и группа, от имени которых будет запущен процесс
> userwww-data www-data;
>
> # Число воркеров в новых версиях рекомендовано устанавливать в auto
> worker_processesauto;
>
> error_log   /var/log/nginx/error.log;
> pid /var/run/nginx.pid;
>
> events {
> # Максимальное количество соединений одного воркера
> worker_connections  1024;
>
> # Метод выбора соединений (для FreeBSD будет kqueue)
> use epoll;
>
> # Принимать максимально возможное количество соединений
> multi_accepton;
> }
>
> http {
> # Указываем файл с mime-типами и указываем тип данных по-умолчанию
> include /etc/nginx/mime.types;
> default_typeapplication/octet-stream;
>
> # Отключить вывод версии nginx в ответе
> server_tokens off;
>
> # Метод отправки данных sendfile эффективнее чем read+write
> sendfileon;
>
> # Ограничивает объём данных, который может передан за один вызов
> sendfile(). Нужно для исключения ситуации когда одно соединение может
> целиком захватить воркер
> sendfile_max_chunk  128k;
>
> # Отправлять заголовки и и начало файла в одном пакете
> tcp_nopush  on;
> tcp_nodelay on;
>
> # Сбрасывать соединение если клиент перестал читать ответ
> reset_timedout_connection   on;
> # Разрывать соединение по истечению таймаута при получении заголовка и
> тела запроса
> client_header_timeout   3;
> client_body_timeout 5;
> # Разрывать соединение, если клиент не отвечает в течение 3 секунд
> send_timeout3;
>
> # Задание буфера для заголовка и тела запроса
> client_header_buffer_size   2k;
> client_body_buffer_size 256k;
> # Ограничение на размер тела запроса
> client_max_body_size12m;
>
> # Отключаем лог доступа
> access_log  off;
>
> # Подключаем дополнительные конфиги
> include /etc/nginx/conf.d/*.conf;
> }
>
> Posted at Nginx Forum: https://forum.nginx.org/read.
> php?21,275373,275380#msg-275380
>
> ___
> nginx-ru mailing list
> nginx-ru@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-ru
>



-- 
With best regards
Iurii Medvedev
___
nginx-ru mailing list
nginx-ru@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-ru