<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
					xmlns:content="http://purl.org/rss/1.0/modules/content/"
					xmlns:wfw="http://wellformedweb.org/CommentAPI/"
					xmlns:atom="http://www.w3.org/2005/Atom"
				  >
<channel>
<atom:link rel="self"  type="application/rss+xml"  href="http://rulinux.net/rss_from_sect_4_subsect_3_thread_43192"  />
<title>rulinux.net - Форум - Admin - Эй, как вы там там настраиваете этот свой Nginx в Убунто?</title>
<link>http://rulinux.net/</link>
<description><![CDATA[Портал о GNU/Linux и не только]]></description>
<image><title>rulinux.net - Форум - Admin - Эй, как вы там там настраиваете этот свой Nginx в Убунто?</title>
<link>http://rulinux.net/</link>
<url>http://rulinux.net/rss_icon.png</url>
</image>
<item>
<title>Re:Эй, как вы там там настраиваете этот свой Nginx в Убунто?</title>
<link>https://rulinux.net/message.php?newsid=43192&amp;page=1#223077</link>
<guid>https://rulinux.net/message.php?newsid=43192&amp;page=1#223077</guid>
<pubDate>Sun, 30 Sep 2018 11:51:44 +0300</pubDate>
<description><![CDATA[<p>Сделал отдельный вирт.хост на хосту 'tt-rss', казал ему прямо &quot;root /usr/share/tt-rss/www;&quot; - ну так работает, да.  Андроидный клиент таки считает URL http://tt-rss/ невалидным.
<br><br>
Upd: клиент оказался кривой. Из всего, что нашел в Ф-дроид, работает только &quot;Tiny Tiny RSS&quot;</p>]]></description>
</item>
<item>
<title>Re:Эй, как вы там там настраиваете этот свой Nginx в Убунто?</title>
<link>https://rulinux.net/message.php?newsid=43192&amp;page=1#223076</link>
<guid>https://rulinux.net/message.php?newsid=43192&amp;page=1#223076</guid>
<pubDate>Sun, 30 Sep 2018 11:33:09 +0300</pubDate>
<description><![CDATA[<p>&gt; Тебе нужна директива alias
<br><br>
Так она тоже почему-то не работает, в т.ч. и в приведённом синтаксисе - всё равно 404
<br><br>
&gt; советую не вешать в поддиректории, так как не весь софт с ними нормально работает
<br><br>
Да, меня ф-дроидный клиент уже послал нафиг с урлом вида http://hostname/ttrss - введи, говорит, нормальный УРЛ. Попробую сейчас отдельный виртуальный хост организовать..</p>]]></description>
</item>
<item>
<title>Re:Эй, как вы там там настраиваете этот свой Nginx в Убунто?</title>
<link>https://rulinux.net/message.php?newsid=43192&amp;page=1#223075</link>
<guid>https://rulinux.net/message.php?newsid=43192&amp;page=1#223075</guid>
<pubDate>Sun, 30 Sep 2018 10:14:28 +0300</pubDate>
<description><![CDATA[<p>Убунта тут ни при чём, потому что root в nginx не так работает. В твоём конфиге он при открытии /tt-rss/ он пойдёт на /usr/share/tt-rss/www/tt-rss/. Такой принцип работы nginx, он ставит другой root и ищет там location относительно него.<br><br>Тебе нужна директива alias, что-то такое (по памяти пишу):<br><br><fieldset><legend>text</legend><div class="highlight text"><br />
&nbsp; &nbsp; &nbsp; &nbsp; location /tt-rss/ {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; alias /usr/share/tt-rss/www/;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp;</div></fieldset><br><br>Вот поподробнее и с ссылками: <a href="https://stackoverflow.com/questions/11570321/configure-nginx-with-multiple-locations-with-different-root-folders-on-subdomain">https://stackoverflow.com/questions/11570321/configure-nginx-with-multiple-locations-with-different-root-folders-on-subdomain</a><br><br>К слову, советую не вешать в поддиректории, так как не весь софт с ними нормально работает (относительные урлы и т.д), а сделать поддомен - так будет проще. В дебиане так: ты основной конфиг (nginx.conf и так далее) не трогаешь, а кладёшь конфиги для виртуальных хостов в /etc/nginx/sites-available/something.conf, и делаешь симлинк с него на /etc/nginx/sites-enabled/something.conf, чтобы можно было врубать-вырубать сайт одним нажатием rm.<br><br>Вот, например, у меня ttrss на дебиане с php-fpm (он настраивается отдельно, но там легко, скопировал конфиг да поменял юзера и пути):<br><br>/etc/nginx/sites-available/ttrss.conf<br><br><fieldset><legend>text</legend><div class="highlight text"><br />
server {<br />
&nbsp; &nbsp; &nbsp; &nbsp; root /home/user/www/ttrss/;<br />
&nbsp; &nbsp; &nbsp; &nbsp; server_name ttrss.mydomain.tld;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; listen 443 ssl;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ssl on;<br />
&nbsp; &nbsp; &nbsp; &nbsp; include ssl_simple_params;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ssl_certificate &nbsp; &nbsp; /etc/ssl/root/ttrss.crt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ssl_certificate_key /etc/ssl/root/ttrss.key;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; access_log /var/log/nginx/ttrss_access.log;<br />
&nbsp; &nbsp; &nbsp; &nbsp; error_log /var/log/nginx/ttrss_error.log;<br />
&nbsp; &nbsp; &nbsp; &nbsp; index index.php;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; location / {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try_files $uri $uri/ /index.php;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; location ~ \.php$ {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try_files $uri =404;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fastcgi_split_path_info ^(.+\.php)(/.+)$;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fastcgi_pass unix:/run/php/php7.0-fpm-ttrss.sock;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fastcgi_index index.php;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fastcgi_param &nbsp;SCRIPT_FILENAME &nbsp;$document_root$fastcgi_script_name;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include fastcgi_params;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; location ~ /\.ht {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; deny all;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; location /cache {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; deny all;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; location = /config.php {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; deny all;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}<br />
&nbsp;</div></fieldset></p>]]></description>
</item>
<item>
<title>Эй, как вы там там настраиваете этот свой Nginx в Убунто?</title>
<link>https://rulinux.net/message.php?newsid=43192&amp;page=1#223074</link>
<guid>https://rulinux.net/message.php?newsid=43192&amp;page=1#223074</guid>
<pubDate>Sun, 30 Sep 2018 09:35:02 +0300</pubDate>
<description><![CDATA[<p>Пытаюсь сконфинурять nginx для tt-rss в убунто. Он есть в репах, что удобно. Вебню свою ставит в /usr/share/tt-rss/www. Проблема в том, что получаю 404 при попытке заточить вирт.путь прямо в этот каталог.
<br><br>
Конфиг выглядит примерно так:
<br>
<fieldset><legend>text</legend><div class="highlight text"><br />
&nbsp; &nbsp; &nbsp; &nbsp; root /var/www/html;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; index index.php index.html index.htm index.nginx-debian.html;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; location / {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try_files $uri $uri/ =404;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; location /tt-rss/ {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; root /usr/share/tt-rss/www/;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; try_files $uri $uri/ =404;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp;</div></fieldset>
<br><br>
В последней директиве location перепробовал все комбинации с завершающими слешами (добавлял-убирал), в т.ч. заменив root на alias. В любом случае при попытке доступа Nginx выдаёт 404.
<br><br>
При этом, если в /var/www/html создаю симлинк на /usr/share/tt-rss/www (команда ln -s /usr/share/tt-rss/www /var/www/html/ttrss ) - то так работает как ни в чем ни бывало. А через виртуальный каталог - ни за что не хочет. Что за фигня?</p>]]></description>
</item>
</channel>
</rss>