Search This Blog

Pages

Header Ads Widget

Responsive Advertisement

Sunday, 4 October 2020

How to Install NGINX(Compiled From Source Code) in Ubuntu

 Todays post is about how to install by direct compiling NGINX in ubuntu.

There are two ways two install nginx:-

1. Install pre-built version of nginx. For this you can check nginx docs there are some very simple steps for this step. 

2. Install nginx by download it source and then compile it by yourself.


Why we need to install nginx by  2 step??

In a pre-built version of nginx there are some default modules(you can say some default functionality), but if you need some extra functionality of nginx that is not in pre-built version, then you have to compile it yourself. Because nginx does not support adding module after installation, so every time if you need some new module you have to compile it again. BTW later version of nginx supports adding third party modules after installation. But here we require extra module of nginx not third party thats why we are installing it again. So lets start.

Before installing if you already have nginx install in your system them remove it and also take snapshot of a system because we are going to change lots of config.

sudo apt-get purge nginx nginx-common

STEP - 1;

Here are some basic commands before starting

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential

STEP - 2;

Now install some support libraries that is essential for nginx to run like pcre(for rewrite functionality), openssl(for https), zlib(for compression).

 1. PCRE

sudo apt-get install libpcre3
sudo apt-get install libpcre3-dev

2. OPENSSL

sudo apt-get install openssl

3. ZLIB

sudo apt-get install zlib1g zlib1g-dev

STEP - 3;

Now download source code of nginx current stable version is 1.18 but you can change according to time.

wget https://nginx.org/download/nginx-1.18.0.tar.gz
tar xzf nginx-1.18.0.tar.gz
cd nginx-1.18.0.tar.gz/

STEP - 4;

After downloading the source code now comes the fun part we have to configure it and tell nginx which modules we are going to need.

Example script that i copy paste from nginx docs. Dont worry if you did not understand it actually i also not understand it completely just joking. So as you can see you have to provide all custom setting in /configure command so that nginx can build according to our taste. If you have to understand details of this command you can comment i will write a post about it.

./configure
--sbin-path=/usr/local/nginx/nginx
--conf-path=/usr/local/nginx/nginx.conf
--pid-path=/usr/local/nginx/nginx.pid
--with-pcre=../pcre-8.44
--with-zlib=../zlib-1.2.11
--with-http_ssl_module
--with-stream
--with-mail=dynamic
--add-module=/usr/build/nginx-rtmp-module
--add-dynamic-module=/usr/build/3party_module 

Now as you can see to add module you can use --with-{module_name} and to remove any default module you can use --without-{module_name}. For all module name refer to nginx docs. Here is a command that i use because i want secure_link module, secure link module is use to secure your link like expire time, or bound with ip basicaaly used when you serve protected content to user.

Remember all this command is one line 

./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --with-http_ssl_module --with-http_realip_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_degradation_module

Now you have to run some last commands.

make
sudo make install

 

Done nginx is installed in your system.

Now simply run:-

 sudo nginx
 to start the nginx


NOTE:-

I know while you perform all these some of you got stuck at any step so don't panic comment me the error trace and i will help you out. Because i cannot cover all the error cases in this post.

 


Back with content

 Hello guys,

I am Puneet Jain author of this blog, i started this blog as a "Virus The Ruler Of World" at that time i was a child😜 but now i am a developer and from now on i will post blog regarding to all the tech problems that i faced or facing during my journey of a developer. I believe almost every developer has gone through the same problems, So why not i share my experience  maybe this will save someone's time or effort.


Wednesday, 6 September 2017

Lesson 2 : How To CUSTOMIZE THE STARTUP SCREEN IN WINDOWS

Why
Hello Everyone,
 Yeahhh Sup? Everyone😎
I think I speak to Everybody when I say that the default Windows Startup Screens are really boring, repetitive and monoronous. It is possible to change them. Instead of using the default wallpapers thst with windows...
Now Let see how it works..
...............................................................................................................
Step 1 : Download an application called Windows 7 Logon Background Changer for free from destyy.com/q4MrVn . This application will you to change your start up screen easily and quickly.

Step 2 : Once you Start the application it will display a variety of different wallpapers which can be used as the startup screen for windows. 


Step 3 : Just select any wallpapers of your choice and click on Apply and when you restart your computer the next time, the startup screen would have been changed...
.................................................................................................................

So guys thats it....
Hope you liked it...πŸ˜€πŸ˜€
#like and #Share
computer trick, hacking course, education, window7, windows logon background, 

Sunday, 3 September 2017

Lesson 1 How to Back Up Windows Registry

HACKING WINOWS 1.0 [Startup Lesson]

Heys Guys ,
Firstly a big SORRY for late sratup of this course.
So without wasting lets start. Before doing any trick or i say technique first "YOU ARE REQUIRED TO TAKE BACKUP OF YOUR WINDOW REGISTRY"
...................................................................................................................................................................
Playing Around with the windows registry can be dangerous things to do.Sometimes due to some human error or if something goes wrong while editing the Registry, it is possible for your computer to malfunction. Hence, before playing around with the Windows Registry, it may be a good idea to create a backup copy which allows you to recover yur computer even if something goes wrong . If you are using Windows 7, then follow these steps which i have provided :
....................................................................................................................................................................
Step 1 : Right click on COMPUTER and click on Properties.
Step 2 : Click on the SYSTEM PROTECTION option from the left pane.
Step 3 : Press the CREATE button and Windows will create a restore point  to which your computer can be restored in case of any problems while editing the Registry.
..................................................................................................................
So guys do it..
And pack your belts because from tommorow one by one we teach you all about windows 7.
hope you guys liked it
keep visiting
See you tommorow
Stay protected guys
#Like And #Share
hackingwindows, windowshacking, stay protected, education, hack, hacking course, how to, window7, 

Saturday, 2 September 2017

Refresh or F5

Hey Guys,
sup? everyone
Today i am gonna tell You about #Refresh ......
 

 Guys as you always do refresh on desktop but you did'nt think why we doing refresh
when we do refresh you know what happens ........please think over it...that will rearrange your brain memory ^_^ please don't mind..
If you think that Refresh  will heal your RAM or making space in memory ,,,,,so you are wrong it will not do these things on desktop.............

Now see working
...................................................................................
Refresh just do re-arrange the desktop icons in its own order........😎😎
...................................................................................
hope guys you liked it .........
#like and #share