Hi @Inderpreet and others,
I have installed and made sure that Apache is running fine.
But, unable to install “nginx” as per the error snip pasted here. It says no package found. Could anyone please help me with the right package name.
Thanks,
Yogendra
try to install epel-release yum install epel-release -y
then do yum install nginx -y
btw package name is correct and just setup is not available. Be positive.
You are a legend. Thanks @Tej-Singh-Rana.
Here it gets crazy for me… please @Inderpreet, @Tej-Singh-Rana and others please refer my workaround and guide me where am i going wrong…
Step1: Installed httpd, allowed to listen on 8087 port. Restarted
Step2: Installed nginx, allowed to listen on 8092 port. Restarted
Step3: For configuring nginx as a reverse proxy
i went to "# cd /etc/nginx/sites-available " “# vi reverse-proxy.conf” and entered as per below snip.
Step4: Created “index.html” under var/www/html directory.
Step5: Tried connecting as per below and got an error.
It would be a great learning for me and you as well. Kindly help in getting through this.
Thanks,
Yogendra
Please ignore port no.s as port no.s in snip and what i have written are of different. I tried for 3 times and so got diff port no.s. I have done correctly with port no.s in the lab, please ignore them here.
Hey You don’t need to define two ports in same configuration file. That’s not allowed in apache config file. Suppose in task you have to assign 8090 to apache. so you can change default port of apache (meant default port 80).
First mistake ---- don’t assign 2 port in main config file, otherwise config throws error.
second mistake ---- you have to just assign default apache DocumentRoot path in nginx and you have to change default port of nginx to 8084 as i can see in screenshot.
you can comment listen [::]:80 default_server;
as well because we don’t need ipv6 for now.
and Document root path of apache will be comes here
location / {
root /var/www/html/
}
third mistake ---- you are configuring two ports in nginx 8096, 8084. I don’t know why.
so don’t be change whole configuration otherwise hard to manage back again.
after that you can cross check by curl command as i can see you did in correct way.
Take a bow @Tej-Singh-Rana. Many thanks buddy. Small success status excites me as a Linux beginner and motivates me to keep learning. Thanks again.
1 Like
It’s all your hard work and dedication. Keep practice.
1 Like