<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.apoyar.eu/index.php?action=history&amp;feed=atom&amp;title=Upgrading_major_versions_of_Nginx%2CPHP%2CMysql</id>
	<title>Upgrading major versions of Nginx,PHP,Mysql - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.apoyar.eu/index.php?action=history&amp;feed=atom&amp;title=Upgrading_major_versions_of_Nginx%2CPHP%2CMysql"/>
	<link rel="alternate" type="text/html" href="https://wiki.apoyar.eu/index.php?title=Upgrading_major_versions_of_Nginx,PHP,Mysql&amp;action=history"/>
	<updated>2026-07-21T03:59:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.apoyar.eu/index.php?title=Upgrading_major_versions_of_Nginx,PHP,Mysql&amp;diff=186&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;Upgrading Version of Nginx -----------------------------  Login to Server (on which need to update Nginx version)  •	Cd /home/neal/root/  Download the nginx source  •	wget...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.apoyar.eu/index.php?title=Upgrading_major_versions_of_Nginx,PHP,Mysql&amp;diff=186&amp;oldid=prev"/>
		<updated>2021-06-30T11:11:07Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Upgrading Version of Nginx -----------------------------  Login to Server (on which need to update Nginx version)  •	Cd /home/neal/root/  Download the nginx source  •	wget...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Upgrading Version of Nginx&lt;br /&gt;
-----------------------------&lt;br /&gt;
&lt;br /&gt;
Login to Server (on which need to update Nginx version)&lt;br /&gt;
&lt;br /&gt;
•	Cd /home/neal/root/&lt;br /&gt;
&lt;br /&gt;
Download the nginx source&lt;br /&gt;
&lt;br /&gt;
•	wget http://nginx.org/download/nginx-1.18.0.tar.gz&lt;br /&gt;
&lt;br /&gt;
Unzip the downloaded file&lt;br /&gt;
&lt;br /&gt;
•	tar xzvf filename&lt;br /&gt;
&lt;br /&gt;
•	Nginx –V&lt;br /&gt;
&lt;br /&gt;
Copy the configuration modules in text&lt;br /&gt;
&lt;br /&gt;
Open the server with latest SSL version (demo.apoyar)&lt;br /&gt;
&lt;br /&gt;
•	Nginx –V&lt;br /&gt;
&lt;br /&gt;
Copy the last configuration command with SSL and paste it in text document at last&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Download the open SSL source&lt;br /&gt;
&lt;br /&gt;
•	Go to cd /usr/local/src/&lt;br /&gt;
&lt;br /&gt;
•	wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz&lt;br /&gt;
&lt;br /&gt;
•	tar xzvf filename&lt;br /&gt;
&lt;br /&gt;
•	go to cd root/&lt;br /&gt;
&lt;br /&gt;
•	go to nginx folder&lt;br /&gt;
&lt;br /&gt;
Paste here that configuration module which we have in text document and hit enter&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: - If getting any errors, troubleshoot with the below steps as per errors coming across.&lt;br /&gt;
&lt;br /&gt;
 If the ./configure gives you any errors, take the following steps:&lt;br /&gt;
&lt;br /&gt;
apt-get install uuid-dev&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If ./configure gives you an error about psol not found&lt;br /&gt;
 &lt;br /&gt;
apt-get install libgd-dev in case of this error:&lt;br /&gt;
&lt;br /&gt;
 ./configure: error: the HTTP image filter module requires the GD library.&lt;br /&gt;
 &lt;br /&gt;
apt-get install libgeoip-dev in case of:&lt;br /&gt;
&lt;br /&gt;
 ./configure: error: the GeoIP module requires the GeoIP library.&lt;br /&gt;
 &lt;br /&gt;
install libssl-dev in case of:&lt;br /&gt;
&lt;br /&gt;
 ./configure: error: SSL modules require the OpenSSL library.&lt;br /&gt;
 &lt;br /&gt;
install libpcre++-dev in case of:&lt;br /&gt;
&lt;br /&gt;
 ./configure: error: the HTTP rewrite module requires the PCRE library.&lt;br /&gt;
 &lt;br /&gt;
apt-get install libxslt1-dev in case of:&lt;br /&gt;
&lt;br /&gt;
 ./configure: error: the HTTP XSLT module requires the libxml2/libxslt&lt;br /&gt;
 &lt;br /&gt;
apt-get install zlib1g-dev&lt;br /&gt;
&lt;br /&gt;
./configure: error: the HTTP gzip module requires the zlib library&lt;br /&gt;
 &lt;br /&gt;
apt-get install libpam0g-dev in case of:&lt;br /&gt;
&lt;br /&gt;
make gives you an error:&lt;br /&gt;
&lt;br /&gt;
fatal error: security/pam_appl.h: No such file or directory&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then run below command&lt;br /&gt;
&lt;br /&gt;
•	make&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Uninstall OLD Nginx&lt;br /&gt;
&lt;br /&gt;
•	Cd etc/&lt;br /&gt;
&lt;br /&gt;
•	tar czvf nginx&lt;br /&gt;
&lt;br /&gt;
•	mv nginx /root/&lt;br /&gt;
&lt;br /&gt;
•	dpkg – I   l grep nginx&lt;br /&gt;
&lt;br /&gt;
•	apt-get purge nginx&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After removing old nginx reboot the server&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Installing NEW Nginx&lt;br /&gt;
&lt;br /&gt;
•	Cd /root/nginx 1.18.0&lt;br /&gt;
&lt;br /&gt;
•	Nginx –v&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the nginx command doesn&amp;#039;t work, create a symlink:&lt;br /&gt;
&lt;br /&gt;
•	ln -s /usr/share/nginx/sbin/nginx /usr/sbin/Ln&lt;br /&gt;
&lt;br /&gt;
•	Nginx –V&lt;br /&gt;
&lt;br /&gt;
•	Go to cd etc/	&lt;br /&gt;
&lt;br /&gt;
•	tar xzvf nginx 1.18.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to Cd /nginx/sites-enabled&lt;br /&gt;
&lt;br /&gt;
Check syntax and potential errors:&lt;br /&gt;
&lt;br /&gt;
•	sudo nginx –t&lt;br /&gt;
&lt;br /&gt;
# Will throw this error nginx: [emerg] mkdir() &amp;quot;/var/lib/nginx/body&amp;quot; failed (2: No such file or directory)&lt;br /&gt;
&lt;br /&gt;
# Just create directory&lt;br /&gt;
&lt;br /&gt;
•	mkdir -p /var/lib/nginx &amp;amp;&amp;amp; sudo nginx –t&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create systemd unit file for NGINX:&lt;br /&gt;
&lt;br /&gt;
•	sudo vim /etc/systemd/system/nginx.service&lt;br /&gt;
&lt;br /&gt;
Copy/paste the following content:&lt;br /&gt;
&lt;br /&gt;
NOTE: The location of the PID file and the NGINX binary may be different depending on how NGINX was compiled.&lt;br /&gt;
&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=A high performance web server and a reverse proxy server&lt;br /&gt;
After=network.target&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
Type=forking&lt;br /&gt;
PIDFile=/run/nginx.pid&lt;br /&gt;
ExecStartPre=/usr/sbin/nginx -t -q -g &amp;#039;daemon on; master_process on;&amp;#039;&lt;br /&gt;
ExecStart=/usr/sbin/nginx -g &amp;#039;daemon on; master_process on;&amp;#039;&lt;br /&gt;
ExecReload=/usr/sbin/nginx -g &amp;#039;daemon on; master_process on;&amp;#039; -s reload&lt;br /&gt;
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid&lt;br /&gt;
TimeoutStopSec=5&lt;br /&gt;
KillMode=mixed&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
Start and enable NGINX service:&lt;br /&gt;
&lt;br /&gt;
•	sudo systemctl start nginx.service &amp;amp;&amp;amp; sudo systemctl enable nginx.service&lt;br /&gt;
&lt;br /&gt;
Create UFW NGINX application profile:&lt;br /&gt;
&lt;br /&gt;
•	sudo vim /etc/ufw/applications.d/nginx&lt;br /&gt;
&lt;br /&gt;
Copy/paste the following content:&lt;br /&gt;
&lt;br /&gt;
[Nginx HTTP]&lt;br /&gt;
title=Web Server (Nginx, HTTP)&lt;br /&gt;
description=Small, but very powerful and efficient web server&lt;br /&gt;
ports=80/tcp&lt;br /&gt;
&lt;br /&gt;
[Nginx HTTPS]&lt;br /&gt;
title=Web Server (Nginx, HTTPS)&lt;br /&gt;
description=Small, but very powerful and efficient web server&lt;br /&gt;
ports=443/tcp&lt;br /&gt;
&lt;br /&gt;
[Nginx Full]&lt;br /&gt;
title=Web Server (Nginx, HTTP + HTTPS)&lt;br /&gt;
description=Small, but very powerful and efficient web server&lt;br /&gt;
ports=80,443/tcp&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, verify that UFW app profiles are created and recognized:&lt;br /&gt;
&lt;br /&gt;
•	sudo ufw app list&lt;br /&gt;
&lt;br /&gt;
# Available applications:&lt;br /&gt;
&lt;br /&gt;
  # Nginx Full&lt;br /&gt;
&lt;br /&gt;
  # Nginx HTTP&lt;br /&gt;
&lt;br /&gt;
  # Nginx HTTPS&lt;br /&gt;
&lt;br /&gt;
  # OpenSSH&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>