<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — 502 Bad Gateway when trying to access iRedAdmin on Nginx]]></title>
		<link>https://forum.iredmail.org/topic9015-502-bad-gateway-when-trying-to-access-iredadmin-on-nginx.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic9015.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in 502 Bad Gateway when trying to access iRedAdmin on Nginx.]]></description>
		<lastBuildDate>Thu, 23 Apr 2015 19:17:47 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: 502 Bad Gateway when trying to access iRedAdmin on Nginx]]></title>
			<link>https://forum.iredmail.org/post38403.html#p38403</link>
			<description><![CDATA[<p>It looks like you just installed it, I ran into that yesterday when I wast testing.</p><p>Reboot your server, all the services don&#039;t come up immediately after install.</p>]]></description>
			<author><![CDATA[null@example.com (amora)]]></author>
			<pubDate>Thu, 23 Apr 2015 19:17:47 +0000</pubDate>
			<guid>https://forum.iredmail.org/post38403.html#p38403</guid>
		</item>
		<item>
			<title><![CDATA[Re: 502 Bad Gateway when trying to access iRedAdmin on Nginx]]></title>
			<link>https://forum.iredmail.org/post38402.html#p38402</link>
			<description><![CDATA[<p>oh okay.<br />let me try to start it.<br />not familiar with python.<br />could you advise the command / how-to? please?</p><p>thanks<br />kevin</p><p>EDIT : FOUND IT</p><div class="codebox"><pre><code>service uwsgi start
Starting uWSGI for iredadmin... [uWSGI] getting INI configuration from /etc/uwsgi/iredadmin.ini
                                                           [  OK  ]</code></pre></div><p>After that run :-<br /></p><div class="codebox"><pre><code>service nginx restart</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (superinterstellar)]]></author>
			<pubDate>Thu, 23 Apr 2015 19:11:09 +0000</pubDate>
			<guid>https://forum.iredmail.org/post38402.html#p38402</guid>
		</item>
		<item>
			<title><![CDATA[Re: 502 Bad Gateway when trying to access iRedAdmin on Nginx]]></title>
			<link>https://forum.iredmail.org/post38401.html#p38401</link>
			<description><![CDATA[<p>Zhang asked you, is uWSGI running? It seems like its not as its socket it missing, thus you are getting your errors.</p>]]></description>
			<author><![CDATA[null@example.com (7t3chguy)]]></author>
			<pubDate>Thu, 23 Apr 2015 19:06:59 +0000</pubDate>
			<guid>https://forum.iredmail.org/post38401.html#p38401</guid>
		</item>
		<item>
			<title><![CDATA[Re: 502 Bad Gateway when trying to access iRedAdmin on Nginx]]></title>
			<link>https://forum.iredmail.org/post38393.html#p38393</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>Is uwsgi service running? iRedAdmin is a Python program running with uwsgi.</p></blockquote></div><p>i think i found the error :-</p><div class="codebox"><pre><code>2015/04/23 17:10:21 [crit] 25997#0: *1118 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin HTTP/1.1$
2015/04/23 17:10:33 [crit] 25997#0: *1118 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin HTTP/1.1$
2015/04/23 17:10:35 [crit] 25997#0: *1118 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin HTTP/1.1$
2015/04/23 17:10:44 [crit] 25997#0: *1125 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin HTTP/1.1$
2015/04/23 17:11:05 [crit] 25997#0: *1125 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin HTTP/1.1$
2015/04/23 17:11:15 [crit] 25997#0: *1118 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin/dashboar$
2015/04/23 17:11:17 [crit] 25997#0: *1118 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin/dashboar$
2015/04/23 17:11:23 [crit] 25997#0: *1118 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin HTTP/1.1$
2015/04/23 17:11:28 [crit] 25997#0: *1118 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin HTTP/1.1$
2015/04/23 17:19:26 [emerg] 30696#0: invalid host in upstream &quot;/var/run/uwsgi_iredadmin.socket&quot; in /etc/nginx/conf.d/default.conf:104
2015/04/23 17:22:17 [crit] 25997#0: *1151 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin HTTP/1.1$
2015/04/23 17:22:18 [crit] 25997#0: *1151 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 101.108.24.245, server: _, request: &quot;GET /iredadmin HTTP/1.1$
2015/04/23 18:34:59 [crit] 30859#0: *76 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 171.98.205.179, server: _, request: &quot;GET /iredadmin/dashboard $
2015/04/23 18:35:46 [crit] 30859#0: *76 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 171.98.205.179, server: _, request: &quot;GET /iredadmin/dashboard $
2015/04/23 18:42:01 [crit] 30859#0: *79 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 171.98.205.179, server: _, request: &quot;GET /iredadmin HTTP/1.1&quot;,$
2015/04/23 18:48:47 [crit] 30859#0: *82 connect() to unix:/var/run/uwsgi_iredadmin.socket failed (2: No such file or directory) while connecting to upstream, client: 171.98.205.179, server: _, request: &quot;GET /iredadmin HTTP/1.1&quot;,$</code></pre></div><p>i think emergency says it:-<br />2015/04/23 17:19:26 [emerg] 30696#0: invalid host in upstream &quot;/var/run/uwsgi_iredadmin.socket&quot; in /etc/nginx</p><p>**EDIT: No. Its the critical error, the emergency was my attempt to fix which made it worse. There is a socket problem.</p><p>Any idea why?</p><br /><br /><p>***Edit: Could someone see the config below and advise if its correct:-</p><br /><p>&nbsp; &nbsp; # iRedAdmin: Python scripts<br />&nbsp; &nbsp; location ~ ^/iredadmin(.*) {<br />&nbsp; &nbsp; &nbsp; &nbsp; rewrite ^/iredadmin(/.*)$ $1 break;<br />&nbsp; &nbsp; &nbsp; &nbsp; include uwsgi_params;<br />&nbsp; &nbsp; &nbsp; &nbsp; uwsgi_pass&nbsp; unix:/var/run/uwsgi_iredadmin.socket;<br />&nbsp; &nbsp; &nbsp; &nbsp; uwsgi_param UWSGI_CHDIR /var/www/iredadmin;<br />&nbsp; &nbsp; &nbsp; &nbsp; uwsgi_param UWSGI_SCRIPT iredadmin;<br />&nbsp; &nbsp; &nbsp; &nbsp; uwsgi_param SCRIPT_NAME /iredadmin;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; # iRedAdmin: redirect /iredadmin to /iredadmin/<br />&nbsp; &nbsp; location = /iredadmin {<br />&nbsp; &nbsp; &nbsp; &nbsp; rewrite ^ /iredadmin/;<br />&nbsp; &nbsp; }</p>]]></description>
			<author><![CDATA[null@example.com (superinterstellar)]]></author>
			<pubDate>Thu, 23 Apr 2015 17:02:03 +0000</pubDate>
			<guid>https://forum.iredmail.org/post38393.html#p38393</guid>
		</item>
		<item>
			<title><![CDATA[Re: 502 Bad Gateway when trying to access iRedAdmin on Nginx]]></title>
			<link>https://forum.iredmail.org/post38392.html#p38392</link>
			<description><![CDATA[<p>Is uwsgi service running? iRedAdmin is a Python program running with uwsgi.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Thu, 23 Apr 2015 16:59:41 +0000</pubDate>
			<guid>https://forum.iredmail.org/post38392.html#p38392</guid>
		</item>
		<item>
			<title><![CDATA[502 Bad Gateway when trying to access iRedAdmin on Nginx]]></title>
			<link>https://forum.iredmail.org/post38389.html#p38389</link>
			<description><![CDATA[<p>==== Required information ====<br />- iRedMail version: 0.9<br />- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL<br />- Web server (Apache or Nginx): Nginx<br />- Linux/BSD distribution name and version: Linux<br />- Related log if you&#039;re reporting an issue: <br />====</p><p>Firstly, I just would like to say that Nginx has a much better performance compared to Apache2. Quite fast. I was impressed.&nbsp; However I cant access the iredadmin (tried to read existing forums but could not figure out whats the problem)</p><p>I am getting a :-</p><p>502 Bad Gateway<br />nginx</p><p>Could someone advise why is this. Do I need to stop php?</p>]]></description>
			<author><![CDATA[null@example.com (superinterstellar)]]></author>
			<pubDate>Thu, 23 Apr 2015 16:45:23 +0000</pubDate>
			<guid>https://forum.iredmail.org/post38389.html#p38389</guid>
		</item>
	</channel>
</rss>
