Question

In centos7 how to redirect the requests from nginx to apache. So if nginx is working...

In centos7 how to redirect the requests from nginx to apache.

So if nginx is working on port 80 and 443 and (myexample.com) and apache is working on port 8080 (myexample2.com) !!!
0 0
Add a comment Improve this question Transcribed image text
Answer #1

First open up the nginx configuration by

sudo nano /etc/nginx/sites-available/example

Then make following configurations

server {

        listen   80;

        root /var/www/;

        index index.php index.html index.htm;

server_name example.com;

location / {

        try_files $uri $uri/ /index.php;

        }

location ~ \.php$ {   

       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;

}

         location ~ /\.ht {

                deny all;

        }

}

This configuration sets up a system where all extensions with a php ending are rerouted to the apache backend which will run on port 8080.

Then install Apache.

Add a comment
Know the answer?
Add Answer to:
In centos7 how to redirect the requests from nginx to apache. So if nginx is working...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • In a computer network, a server receives requests from two computers (A and B) working independently....

    In a computer network, a server receives requests from two computers (A and B) working independently. In a period of one hour, computers A and B send service requests distributed according to Poisson random variables with parameters 11 and 12, respectively. 1. What is the PMF of the total number of service requests received in one hour? 2. If we know that the total number of received service requests is n, what is the PMF of the roquets received from...

  • Answer the following questions using linux 1) Write a Python script so that a file whoComesForDinner.txt...

    Answer the following questions using linux 1) Write a Python script so that a file whoComesForDinner.txt formatted like this:      Tuesday we have Joe McHungry and Paul McHungry Wednesday we have Cindy Johnston and Paul Paulsen Thursday we have Amin Mirzaei and Atefeh Mirzaei gets turned into that: The McHungry on Tuesday Cindy and Paul on Wednesday The Mirzaei on Thursday 2)Write a script that takes as argument a port number. It returns the next port that is not assigned to...

  • How could blocking all ICMP traffic protect you? Could you still access some websites with your...

    How could blocking all ICMP traffic protect you? Could you still access some websites with your Port 80 rule enabled? Why? Why would you want to allow incoming (not outgoing) Port 443, but block incoming Port 80? Could malware rename itself in order to get through a firewall? Why would this work?

  • Project Description In this project, you will be developing a multithreaded Web server and a simple...

    Project Description In this project, you will be developing a multithreaded Web server and a simple web client. The Web server and Web client communicate using a text-based protocol called HTTP (Hypertext Transfer Protocol). Requirements for the Web server The server is able to handle multiple requests concurrently. This means the implementation is multithreaded. In the main thread, the server listens to a specified port, e.g., 8080. Upon receiving an HTTP request, the server sets up a TCP connection to...

  • . Consider a TCP connection between Host A and Host B. Suppose that the TCP segments...

    . Consider a TCP connection between Host A and Host B. Suppose that the TCP segments traveling from Host A to Host B have source port number 37 and destination port number 61. What are the source and destination port numbers for the segments traveling from Host B to Host A? 
 . Suppose a process in Host C has a UDP socket with port number 6789. Sup- pose both Host A and Host B each send a UDP segment to...

  • Question 1 Assume you are working for Green Energy as a network administrator. The manager requests...

    Question 1 Assume you are working for Green Energy as a network administrator. The manager requests you to develop a network security policy. You consider writing a guideline on securing access to network data by setting up authentication and authorisation and configuring password requirements. a. Explain what authentication and authorisation are, and b. Give at least three recommendations to users on selecting a good password. Question 2 living/working/studying environmentsby collecting and demonstrating the data of temperature, humidity, air quality and...

  • So I cleaned up some malicious PHP scripts from a client's site and I've been monitoring...

    So I cleaned up some malicious PHP scripts from a client's site and I've been monitoring for follow up connections to the scripts. Of course, I've found a LOT of IPs requesting the files. Too many to try and blacklist and too many different netblocks to block at a high level. I'm thinking about redirecting all subsequent requests for the files to some kind of blackhole/tarpit/honeypot/bad guy reporting system, but I'm not sure if such a thing exists for HTTP...

  • It's finals week, so it's important to reduce stress by working out (now that your favorite...

    It's finals week, so it's important to reduce stress by working out (now that your favorite gym has reopened). As triacylglycerols are liberated from your adipose tissue during your workout, what products are released from your adipocytes? How are those products used by other tissues? Let's assume that you are healthy and not carbohydrate deficient. Hint: The fatty acids liberated from your adipocytes were oxidized to acetyl CoA and entered the Krebs cycle. Describe how com produced from this cycle...

  • Hosts A and B are communicating over a TCP connection, and Host B has already received from A all...

    Hosts A and B are communicating over a TCP connection, and Host B has already received from A all bytes up to and including byte 1029. Suppose Host A then sends three segments to Host B back-to-back. The first, second and third segments contain 1200, 150 and 80 bytes of data respectively. In the first segment, the sequence number is 1060, the source port number is 8080, and the destination port number is 80. Host B sends an acknowledgment whenever...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT