I have a task to to install apache and nginx and run them on some respective ports
For apache I have changed port no. in /etc/httpd/conf/httpd.conf location but unable to change port for nginx.
I’m confused when to use /etc/nginx/nginx.conf and when to create default.conf file in /etc/ngnix/conf.d/ location.
settings of nginx as a reverse proxy help
while creating default.conf file in /etc/ngnix/conf.d/ location which lines are needed to be added to the file, I have read some articles but didn’t get why do they use above code while we add apache as reverse proxy
proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; proxy_pass http://127.0.0.1:8080;
please help me as I am a begineer
[gone through this link ] (https://www.hugeserver.com/kb/configure-nginx-reverse-proxy-apache-centos/)