<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; nginx не показывает картинки на всех доменах кроме главного]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=6296&amp;type=atom" />
	<updated>2010-09-03T13:07:40Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=6296</id>
		<entry>
			<title type="html"><![CDATA[nginx не показывает картинки на всех доменах кроме главного]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=87186#p87186" />
			<content type="html"><![CDATA[<p>Поставил nginx, настроил конфиг, но вот беда картинки отображаются только на домене прописаном в root, а на всех остальных доменах (а у меня их 10 - картинки не отображаются)</p><div class="quotebox"><blockquote><p>worker_processes&nbsp; 1;</p><p>events {<br />&nbsp; &nbsp; worker_connections&nbsp; 1024;<br />}</p><p>http {<br />&nbsp; &nbsp; include&nbsp; &nbsp; &nbsp; &nbsp;mime.types;<br />&nbsp; &nbsp; default_type&nbsp; application/octet-stream;</p><p>&nbsp; &nbsp; log_format main&nbsp; &#039;$remote_addr - $remote_user [$time_local] $status &#039;<br />&nbsp; &nbsp; &#039;&quot;$request&quot; $body_bytes_sent &quot;$http_referer&quot; &#039;<br />&nbsp; &nbsp; &#039;&quot;$http_user_agent&quot; &quot;http_x_forwarded_for&quot;&#039;;</p><p>&nbsp; &nbsp; # access_log /var/log/nginx/access.log main;</p><p>&nbsp; &nbsp; sendfile&nbsp; &nbsp; &nbsp; &nbsp;on;<br />&nbsp; &nbsp; tcp_nopush&nbsp; &nbsp; &nbsp;on;<br />&nbsp; &nbsp; tcp_nodelay&nbsp; &nbsp; on;</p><p>&nbsp; &nbsp; server {<br />&nbsp; &nbsp; &nbsp; &nbsp; listen&nbsp; &nbsp; &nbsp; &nbsp;80 default;<br />&nbsp; &nbsp; &nbsp; &nbsp; <strong>server_name&nbsp; site.ru <a href="http://www.site.ru">www.site.ru</a>;</strong><br />&nbsp; &nbsp; &nbsp; &nbsp; # access_log&nbsp; /var/log/httpd/access.log&nbsp; main;</p><p>&nbsp; &nbsp; &nbsp; &nbsp; # Main location<br />&nbsp; &nbsp; &nbsp; &nbsp; location / {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_pass&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://127.0.0.1:8080">http://127.0.0.1:8080</a>/;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_redirect&nbsp; &nbsp; &nbsp;off;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_set_header&nbsp; &nbsp;Host&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$host;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_set_header&nbsp; &nbsp;X-Real-IP&nbsp; &nbsp; &nbsp; &nbsp; $remote_addr;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_set_header&nbsp; &nbsp;X-Forwarded-For&nbsp; $proxy_add_x_forwarded_for;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_max_body_size&nbsp; &nbsp; &nbsp; &nbsp;10m;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; client_body_buffer_size&nbsp; &nbsp; 128k;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_connect_timeout&nbsp; &nbsp; &nbsp; 90;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_send_timeout&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;90;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_read_timeout&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;90;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_buffer_size&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4k;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_buffers&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4 32k;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_busy_buffers_size&nbsp; &nbsp; 64k;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; proxy_temp_file_write_size 64k;<br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; &nbsp; &nbsp; # Static files location<br />&nbsp; &nbsp; &nbsp; &nbsp; location ~*^.+\.(jpg|jpeg|gif|png|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|js)$<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <strong>root&nbsp; &nbsp;/var/www/vhosts/site.ru/httpdocs/;</strong><br />&nbsp; &nbsp; &nbsp; &nbsp; }</p><p>&nbsp; &nbsp; }<br />}</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[Settler]]></name>
				<uri>https://linuxforum.ru/profile.php?id=10276</uri>
			</author>
			<updated>2010-09-03T13:07:40Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=87186#p87186</id>
		</entry>
</feed>
