Dear @Inderpreet @kodekloud-support3
I have verified the index.html file from the jump host on the backup server is the same but the validation is telling me that I have copied the wrong file. Why? Please check.
Thanks.
Dear @Inderpreet @kodekloud-support3
I have verified the index.html file from the jump host on the backup server is the same but the validation is telling me that I have copied the wrong file. Why? Please check.
Thanks.
@Salim @oussama.smairkandi @kiran
Sorry for this inconvenience, this happened due to some maintenance we are doing. I am marking this task as Success
for you guys.
@sanyamc230493 According to your config your Nginx and Apache are using different document roots . /var/www
for Nginx and /var/www/html
for Apache, why so ?
Actually you need not to define root for Nginx since it will server what Apache has.
Make sure that you nginx config knows were static content is root /var/www/html
Hi @Chudo, @devops503 , @kodekloud-support3
I may be facing a similar issue , can you please help .
The apache server is supposed to run on port 6000 and nginx on 8095 .
httpd.conf was updated :
Listen 6000
default nginx.conf updated server section as follows :
server {
listen 8095 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
}
}
And i created a proxy.conf in /etc/nginx/conf.d/ as below
server {
listen 8095;
server_name 172.16.238.16;
root /var/www/html;
}
location / {
proxy_pass http://localhost:6000;
}
So i have set the root to point to apache root /var/www/html in proxy.conf .
I am encountering 2 issues :
/usr/share/nginx/html
is ForbiddenHi Antony
/etc/nginx/nginx.conf
user nginx; => user apache; make Nginx work under this user
server {
listen 8095 default;
server_name 172.16.238.16;
}
location / {
root /var/www/html; => Move the root line to location section
}
Yes,
The changes on nginx.conf
/etc/nginx/nginx.conf
user nginx; => user apache; make Nginx work under this user
server {
listen 8095 default;
server_name 172.16.238.16;
}
location / {
root /var/www/html; => Move the root line to location section
proxy_pass http://127.0.0.1:6000/;
proxy_redirect off;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr
}
All necessary settings for proxing
/etc/nginx/conf.d/proxy.conf
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10 m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
kindly help i am not able to install nginx.
and please provide me further steps to complete the task.
Thanks
Hi , you need to install epel-release before you can install nginx ,ie,
yum install epel-release -y
yum install nginx -y
For the main setup , follow the steps mentioned in the topic
@devops503…For this task I installed apache first and the did changes in conf file and changed the port as mentioned in the problem statement…and the installed nginx and followed the steps you mentioned…but after starting nginx …getting the error…Also , in nginx status i checked… something is wrong with the conf file…plz advice what i am doing wrong/…
Can anyone plz suggest …what did i do wrong in configuration file…
nginx -t with the help of this command you can config error in nginx config file
Edit the file and change below parameters according to your question.
listen 8096;
listen [::]:8096;
server_name 172.16.238.16;
Under location tab, add below line
proxy_pass http://172.16.238.16:8082