Posts

Showing posts from 2016

Haproxy + ngnix with same domain name 2 different url Doc:-

Haproxy + ngnix with same domain name 2 different url Doc:- Base OS RHEL7 and Two Virtual Machine ngnix installation. (Base Machine IP 192.168.0.10 create local yum # rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm # yum install nginx # systemctl start nginx.service check with web :- http://IP # systemctl enable nginx # cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/web.conf # vim /etc/nginx/conf.d/web.conf server { listen 80; server_name testserver.com; location / { root /usr/share/nginx/html/test; index index.html index.htm; } } # mkdir /usr/share/nginx/html/test # echo “This is Test Home” > /usr/share/nginx/html/test/index.html # systemctl restart nginx.service # vim /etc/hosts 127.0.0.1 testserver.com check with web :- http://testserver.com ############################################################################################################ ###############################################