<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=3768&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / How to install Nginix + Postgres + PHP]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=3768</link>
		<description><![CDATA[The most recent posts in How to install Nginix + Postgres + PHP.]]></description>
		<lastBuildDate>Wed, 26 Aug 2020 07:40:31 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24321#p24321</link>
			<description><![CDATA[<div class="quotebox"><cite>walterbyrd wrote:</cite><blockquote><div><p>I think I have nginix and postgres installed. I just mentioned those because I don&#039;t want to install PHP for apache2 or mysql.</p></div></blockquote></div><p>just install php-fpm and remove apache* packages. you don&#039;t need the complete php7.0 metapackage with nginx.&#160; just necessary php modules and php-cli if you need to also run php commands by hand.</p>]]></description>
			<author><![CDATA[dummy@example.com (xinomilo)]]></author>
			<pubDate>Wed, 26 Aug 2020 07:40:31 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24321#p24321</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24319#p24319</link>
			<description><![CDATA[<p>I&#039;ve got it working time ago:</p><p><a href="http://dev1galaxy.org/viewtopic.php?id=2405" rel="nofollow">http://dev1galaxy.org/viewtopic.php?id=2405</a></p><p>This howto is in spanish because i wrote it for the developers of EterTics (Argentina). It may be a bit obsolete, but you can find there the configuration I used.<br />On the other hand, you don&#039;t need to remove apache2. Stopping it is enough.</p><p>By the way, SteveT has a tutorial about nginx in his website:</p><p><a href="http://www.troubleshooters.com/linux/nginx/" rel="nofollow">http://www.troubleshooters.com/linux/nginx/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (aitor)]]></author>
			<pubDate>Tue, 25 Aug 2020 23:37:41 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24319#p24319</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24307#p24307</link>
			<description><![CDATA[<p>Giving up in frustration. Will try lighttpd.</p>]]></description>
			<author><![CDATA[dummy@example.com (walterbyrd)]]></author>
			<pubDate>Tue, 25 Aug 2020 14:56:09 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24307#p24307</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24256#p24256</link>
			<description><![CDATA[<p>I could not let it go. </p><p>I reinstalled files, and got it working. </p><p>I am not even sure of what all I did.</p><p>In the snippets/fastcgi_params file, I replaced &#039;include fastcgi-php.conf&#039; with &#039;include fastcgi_params&#039;</p><p>Then, I had to add a /etc/nginx/fastcgi_params file, which I copied from a sample file on the nginx site.</p><p>Still not working for Moodle. Nginx will not load javascript. </p><p>I tried nginx, a long time ago, and found fairly easy to use. Now I am finding it extremely difficult.</p>]]></description>
			<author><![CDATA[dummy@example.com (walterbyrd)]]></author>
			<pubDate>Fri, 21 Aug 2020 18:23:44 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24256#p24256</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24254#p24254</link>
			<description><![CDATA[<p>I blew the entire thing away. Removed the entire /etc/nginx directory.</p><p>I thought an apt install would install that directory, but it doesn&#039;t. May be just as well. Beyond frustrated.</p>]]></description>
			<author><![CDATA[dummy@example.com (walterbyrd)]]></author>
			<pubDate>Fri, 21 Aug 2020 16:38:29 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24254#p24254</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24253#p24253</link>
			<description><![CDATA[<p>I backed up my /etc/nginx/sites-enabled/default file, and used the one you posted. I started nginx, and got this:</p><div class="codebox"><pre><code># cat /var/log/nginx/error.log
2020/08/21 09:52:07 [emerg] 7888#7888: a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/default:22</code></pre></div><p>When I comment those lines out, nginx will run, and it will load an html file, but it will not load a php file.</p>]]></description>
			<author><![CDATA[dummy@example.com (walterbyrd)]]></author>
			<pubDate>Fri, 21 Aug 2020 15:56:39 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24253#p24253</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24242#p24242</link>
			<description><![CDATA[<p>I think those listen lines should be enabled.<br />Here is my sites-available/default</p><div class="codebox"><pre class="vscroll"><code>##
# You should look at the following URL&#039;s in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##

# Default server configuration
#
server {
	listen 80 default_server;
	listen [::]:80 default_server;

	# SSL configuration
	#
	# listen 443 ssl default_server;
	# listen [::]:443 ssl default_server;
	#
	# Note: You should disable gzip for SSL traffic.
	# See: https://bugs.debian.org/773332
	#
	# Read up on ssl_ciphers to ensure a secure configuration.
	# See: https://bugs.debian.org/765782
	#
	# Self signed certs generated by the ssl-cert package
	# Don&#039;t use them in a production server!
	#
	# include snippets/snakeoil.conf;

	root /var/www/html;

	# Add index.php to the list if you are using PHP
	index index.php index.html index.htm index.nginx-debian.html;

	server_name _;

	location / {
		# First attempt to serve request as file, then
		# as directory, then fall back to displaying a 404.
		try_files $uri $uri/ =404;
	}

	# pass PHP scripts to FastCGI server
	#
	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
	#
	#	# With php-fpm (or other unix sockets):
		fastcgi_pass unix:/run/php/php7.3-fpm.sock;
	#	# With php-cgi (or other tcp sockets):
	#	fastcgi_pass 127.0.0.1:9000;
	}

	# deny access to .htaccess files, if Apache&#039;s document root
	# concurs with nginx&#039;s one
	#
	location ~ /\.ht {
		deny all;
	}
}

# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#
#server {
#	listen 80;
#	listen [::]:80;
#
#	server_name example.com;
#
#	root /var/www/example.com;
#	index index.html;
#
#	location / {
#		try_files $uri $uri/ =404;
#	}
#}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (juic3)]]></author>
			<pubDate>Fri, 21 Aug 2020 06:10:35 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24242#p24242</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24240#p24240</link>
			<description><![CDATA[<p>Apache2 was running, but I shut it down and removed it. </p><p>I re-installing nginx.</p><p>I may have nginx somewhat working. </p><p>in the /etc/nginx/sites-enabled/default file, there was a <span class="bbc">#</span> in front of a <span class="bbc">}</span> where there should not be:</p><div class="codebox"><pre><code>       
 location ~ \.php$ {
                include snippets/fastcgi-php.conf;

# With php-fpm (or other unix sockets):
 fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
# With php-cgi (or other tcp sockets):
#   fastcgi_pass 127.0.0.1:9000;
# }</code></pre></div><p>I am not sure how that got there, but I removed that. </p><p>Also in the /etc/nginx/sites-enabled/default file, when trying to fix it (I guess), I uncommented these two listen statements. So I re-commented them.</p><div class="codebox"><pre><code>server {
	# listen 80 default_server;
	# listen [::]:80 default_server;</code></pre></div><p>It will load an html file, but not a php file. When I try to load &#039;index.php&#039; which just contains <span class="bbc">&lt;?php echo phpinfo(); ?&gt;</span>&#160; I get a &#039;500 Internal Server Error&#039;. Not sure why. </p><p>I added index.php to /etc/nginx/sites-enabled/default</p><div class="codebox"><pre><code># Add index.php to the list if you are using PHP
index index.php index.html index.htm;</code></pre></div><p>I also installed php-fpm</p><div class="codebox"><pre><code># apt install php-fpm

# whereis php-fpm
php-fpm: /usr/sbin/php-fpm7.0

# ls /var/run/php/
php7.0-fpm.pid	php7.0-fpm.sock

# cat /var/log/nginx/error.log
2020/08/20 15:09:14 [error] 21338#21338: *1 rewrite or internal redirection cycle while internally redirecting to &quot;/index.html&quot;, client: 127.0.0.1, server: myserver, request: &quot;GET / HTTP/1.1&quot;, host: &quot;127.0.0.1&quot;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (walterbyrd)]]></author>
			<pubDate>Thu, 20 Aug 2020 20:02:15 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24240#p24240</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24201#p24201</link>
			<description><![CDATA[<p>Are you sure your config id ok? You can test it with -t flag (or -T).<br />Is apache running and serving in port 80?</p><p>edit:<br />Just tested installing ngix and that was all I had to do. worked out of box.<br />So I think you have apache running. Try stopping apache service.</p><p>edit2:<br />The raspberry intructions seemed legit. Digitalocean ( <a href="https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04)" rel="nofollow">https://www.digitalocean.com/community/ … ntu-16-04)</a> has similar instructions with some security settings. Just replace systemd commands with sysv equivalents.</p>]]></description>
			<author><![CDATA[dummy@example.com (juic3)]]></author>
			<pubDate>Thu, 20 Aug 2020 09:57:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24201#p24201</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24187#p24187</link>
			<description><![CDATA[<p>No problem. I just installed PHP with the apache2 stuff. I don&#039;t think it will hurt anything. I think there is some other PHP package I&#039;m supposed to install for Postgres, I am not sure if I have that. </p><p>Although I have Nginx installed, I do not have it configured. All the documentation that I am finding is for debian/ubuntu. Does anybody know of any documentation for Nginx that will work with Devuan?</p><p>I removed apache2. Trying to follow the instructions here:</p><p><a href="https://www.raspberrypi.org/documentation/remote-access/web-server/nginx.md" rel="nofollow">https://www.raspberrypi.org/documentati … r/nginx.md</a></p><p>Still having trouble.</p><div class="codebox"><pre><code># /etc/init.d/nginx start
[FAIL] Starting nginx: nginx failed!</code></pre></div><div class="codebox"><pre><code># cat /var/log/nginx/error.log
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 05:02:31 [emerg] 1731#1731: still could not bind()
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to 0.0.0.0:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: listen() to [::]:80, backlog 511 failed (98: Address already in use)
2020/08/19 08:11:25 [emerg] 9843#9843: still could not bind()
2020/08/19 08:26:43 [emerg] 10160#10160: a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/default:22
2020/08/19 08:41:44 [emerg] 10569#10569: a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/default:22
2020/08/19 08:42:51 [emerg] 10826#10826: a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/default:22
2020/08/19 08:49:33 [emerg] 10954#10954: a duplicate default server for 0.0.0.0:80 in /etc/nginx/sites-enabled/default:22</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (walterbyrd)]]></author>
			<pubDate>Wed, 19 Aug 2020 14:08:47 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24187#p24187</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24170#p24170</link>
			<description><![CDATA[<p>It&#039;s an hard dependency :</p><div class="codebox"><pre><code>apt-cache show php7.0
Package: php7.0
Version: 7.0.33-0+deb9u8
Depends: libapache2-mod-php7.0 | php7.0-fpm | php7.0-cgi, php7.0-common</code></pre></div><p>So, instead of installing a meta package you should install packages independently like <a href="https://hostup.org/blog/how-to-install-nginx-and-php-7-4-on-debian-10/" rel="nofollow">https://hostup.org/blog/how-to-install- … debian-10/</a></p>]]></description>
			<author><![CDATA[dummy@example.com (szutt)]]></author>
			<pubDate>Wed, 19 Aug 2020 08:22:37 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24170#p24170</guid>
		</item>
		<item>
			<title><![CDATA[Re: How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24164#p24164</link>
			<description><![CDATA[<p>Try using &#039;apt install php7.0 apache2- apache2-bin-&#039;. apache is just a recommends in php7.0, so it should be possible to install php without apache.</p>]]></description>
			<author><![CDATA[dummy@example.com (jobbautista9)]]></author>
			<pubDate>Wed, 19 Aug 2020 03:06:17 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24164#p24164</guid>
		</item>
		<item>
			<title><![CDATA[How to install Nginix + Postgres + PHP]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=24153#p24153</link>
			<description><![CDATA[<p>I think I have nginix and postgres installed. I just mentioned those because I don&#039;t want to install PHP for apache2 or mysql.</p><p>I guessing it won&#039;t hurt anything to install all that apache2 stuff, or sqlite3, but I would prefer to install just for nginx and postgres.</p><div class="codebox"><pre><code># apt install php7.0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap php-common
  php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom php-pear
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php7.0 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap php-common
  php7.0 php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline
0 upgraded, 16 newly installed, 0 to remove and 2 not upgraded.
Need to get 5,592 kB of archives.
After this operation, 20.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (walterbyrd)]]></author>
			<pubDate>Tue, 18 Aug 2020 18:33:01 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=24153#p24153</guid>
		</item>
	</channel>
</rss>
