Monday, 22 October 2018

How to configure NGINX

How to configure NGINX
===================

[root@digiportal03 alice]# rpm -ivh epel-release-6-8.noarch.rpm
warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]
 
[root@digiportal03 alice]# rpm -ivh nginx-release-centos-6-0.el6.ngx.noarch.rpm
warning: nginx-release-centos-6-0.el6.ngx.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
Preparing...                ########################################### [100%]
   1:nginx-release-centos   ########################################### [100%]

[root@digiportal03 alice]# rpm -ivh nginx-1.14.0-1.el6.ngx.x86_64.rpm
warning: nginx-1.14.0-1.el6.ngx.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 7bd9bf62: NOKEY
Preparing...                ########################################### [100%]
   1:nginx                  ########################################### [100%]
----------------------------------------------------------------------

Thanks for using nginx!

Please find the official documentation for nginx here:
* http://nginx.org/en/docs/

Please subscribe to nginx-announce mailing list to get
the most important news about nginx:
* http://nginx.org/en/support.html

Commercial subscriptions for nginx are available on:
* http://nginx.com/products/

----------------------------------------------------------------------
Move or rename the default.conf present in the /etc/nginx/conf.d/

vim /etc/nginx/conf.d/load-balancer.conf

upstream backend {
   server 10.155.13.57;
   server 10.155.13.139;
}
server {
    listen 80;
    server_name  10.155.13.102;
        location / {
      proxy_pass http://backend;
   }
}

save and exit

After that reload ngninx service

/etc/init.d/nginx reload

Log file path:-
/var/log/nginx/
/var/log/nginx/access.log
/var/log/nginx/error.log

Default SSL and vhost config directory:-
/etc/nginx/conf.d/

Default configuration file:-
/etc/nginx/nginx.conf

Monday, 15 October 2018

How to change default Shell


If we want to change the default shell then we need to use chsh command.

Through below command we can change the default shell and after changing the default change we need to restart the server to see the changes applied or not.