<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; centos7 nginx yii-framework]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=37333&amp;type=atom" />
	<updated>2015-01-11T10:58:48Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=37333</id>
		<entry>
			<title type="html"><![CDATA[Re: centos7 nginx yii-framework]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=439986#p439986" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>getenforce
Disabled</code></pre></div><p>вот конфиг /etc/php-fpm.d/www.conf:<br /></p><div class="codebox"><pre><code>[www]
listen = 127.0.0.1:9000
listen.allowed_clients = 127.0.0.1
user = nginx 
group = nginx
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
slowlog = /var/log/php-fpm/www-slow.log
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /var/lib/php/session</code></pre></div>]]></content>
			<author>
				<name><![CDATA[vinner]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21046</uri>
			</author>
			<updated>2015-01-11T10:58:48Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=439986#p439986</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: centos7 nginx yii-framework]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=439962#p439962" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>vinner пишет:</cite><blockquote><p>Так у меня selinux вообще отключен</p></blockquote></div><p>а вообще об этом надо в первом посте сообщать</p>]]></content>
			<author>
				<name><![CDATA[alexfinn]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25867</uri>
			</author>
			<updated>2015-01-10T19:24:26Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=439962#p439962</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: centos7 nginx yii-framework]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=439961#p439961" />
			<content type="html"><![CDATA[<p>проверьте еще настройки в конфигах php-fpm, в частности, кому разрешено коннектиться к нему</p>]]></content>
			<author>
				<name><![CDATA[alexfinn]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25867</uri>
			</author>
			<updated>2015-01-10T19:23:51Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=439961#p439961</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: centos7 nginx yii-framework]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=439960#p439960" />
			<content type="html"><![CDATA[<p>выключен или включен прям в конкретный момент проверять лучше так:</p><div class="codebox"><pre><code># getenforce</code></pre></div><p>отключение в конфиге начнет действовать после перезагрузки</p>]]></content>
			<author>
				<name><![CDATA[alexfinn]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25867</uri>
			</author>
			<updated>2015-01-10T19:23:02Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=439960#p439960</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: centos7 nginx yii-framework]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=439923#p439923" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexfinn пишет:</cite><blockquote><p>selinux настройте<br />пример:</p><div class="codebox"><pre><code># setsebool httpd_can_network_connect on
# chcon -R -t httpd_sys_content_t /usr/share/nginx/html/domain.ua/
# chcon -R -t httpd_sys_rw_content_t /usr/share/nginx/html/domain.ua/</code></pre></div></blockquote></div><p>Так у меня selinux вообще отключен:<br />/etc/selinux/config<br /></p><div class="codebox"><pre><code>SELINUX=disabled</code></pre></div>]]></content>
			<author>
				<name><![CDATA[vinner]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21046</uri>
			</author>
			<updated>2015-01-10T14:47:24Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=439923#p439923</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: centos7 nginx yii-framework]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=439921#p439921" />
			<content type="html"><![CDATA[<p>selinux настройте<br />пример:</p><div class="codebox"><pre><code># setsebool httpd_can_network_connect on
# chcon -R -t httpd_sys_content_t /usr/share/nginx/html/domain.ua/
# chcon -R -t httpd_sys_rw_content_t /usr/share/nginx/html/domain.ua/</code></pre></div>]]></content>
			<author>
				<name><![CDATA[alexfinn]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25867</uri>
			</author>
			<updated>2015-01-10T14:22:38Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=439921#p439921</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[centos7 nginx yii-framework]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=439910#p439910" />
			<content type="html"><![CDATA[<p>Добрый день. Подскажите, если кто настраивал yii на nginx+php-fpm </p><div class="codebox"><pre><code>server {
    set $host_path &quot;/usr/share/nginx/html/domain.ua&quot;;
    access_log  /usr/share/nginx/html/domain.ua/log/access.log  main;
    error_log /usr/share/nginx/html/domain.ua/log/error.log;

    server_name  devtest.vsedoma.ua;
    root   $host_path/estate;
    set $yii_bootstrap &quot;index.php&quot;;

    charset utf-8;

    location / {
        index  index.html $yii_bootstrap;
        try_files $uri $uri/ /$yii_bootstrap?$args;
    }

    location ~ ^/(protected|framework|themes/\w+/views) {
        deny  all;
    }

    # отключаем обработку запросов фреймворком к несуществующим статичным файлам
    location ~ \.(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
        try_files $uri =404;
    }

    # передаем PHP-скрипт серверу FastCGI, прослушивающему адрес 127.0.0.1:9000
    location ~ \.php {
        fastcgi_split_path_info  ^(.+\.php)(.*)$;

        # позволяем yii перехватывать запросы к несуществующим PHP-файлам
        set $fsn /$yii_bootstrap;
        if (-f $document_root$fastcgi_script_name){
            set $fsn $fastcgi_script_name;
        }

        fastcgi_pass   127.0.0.1:9000;
        include fastcgi_params;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fsn;

        # PATH_INFO и PATH_TRANSLATED могут быть опущены, но стандарт RFC 3875 определяет для CGI
        fastcgi_param  PATH_INFO        $fastcgi_path_info;
        fastcgi_param  PATH_TRANSLATED  $document_root$fsn;
    }

    # не позволять nginx отдавать файлы, начинающиеся с точки (.htaccess, .svn, .git и прочие)
    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;
    }
} </code></pre></div><p>Получаю вот такую ошибку<br /></p><div class="codebox"><pre><code>Unable to open primary script: /usr/share/nginx/html/domain.ua/estate/index.php (Permission denied)&quot; while reading response header from upstream
В браузере Access denied. </code></pre></div><p>пробовал изменять права. Уже от отчаяния сделал 777 на /usr/share/nginx/html/domain.ua</p><p>у меня на localhost есть 2 папки(на localhost все работает). Nginx и php-fpm запущены под пользователем nginx. Владельцем папки и <br />/usr/share/nginx/html/domain.ua<br />estate - с проектом<br />framework - yii</p>]]></content>
			<author>
				<name><![CDATA[vinner]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21046</uri>
			</author>
			<updated>2015-01-10T12:03:42Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=439910#p439910</id>
		</entry>
</feed>
