Activity Stream
48,167 MEMBERS
61001 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 5 of 5
  1.     
    #1
    Member
    Website's:
    i-fresh.net

    Question Have a little confusion with Nginx config as reverse proxy

    Hello,

    I install nginx as a reverse proxy. If I use
    PHP Code: 
    proxy_pass http://127.0.0.1:port 
    , it does not work. But if I use
    PHP Code: 
    proxy_pass domain:port 
    , it works. Even I can use browser to access
    PHP Code: 
    http://ip:port 
    .

    Could anyone explain for me?
    KingOfDCP Reviewed by KingOfDCP on . Have a little confusion with Nginx config as reverse proxy Hello, I install nginx as a reverse proxy. If I use proxy_pass http://127.0.0.1:port, it does not work. But if I use proxy_pass domain:port, it works. Even I can use browser to access http://ip:port. Could anyone explain for me? Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Banned
    Website's:
    xsl.tel xsltel.com
    I will assume you have apache as backend server. if so

    you need to pass "Host: header to apache so it knows what domain to serve"

    try to add this into your nginx conf

    Code: 
    proxy_set_header   Host   $host;
    Highest Regards
    Mohammed H

  4.     
    #3
    Member
    Website's:
    i-fresh.net
    Yes, I use apache as backend server. I already added it before.

  5.     
    #4
    Banned
    Website's:
    xsl.tel xsltel.com
    Hello,

    ok so you are passing requests to http://127.0.0.1: port .

    are you sure Apache is listneing on that IP and Port.

    also try to pass requests to your VPS/Server public IP not 127.0.0.1

    also if it didn't work either can you post VirtualHost directive of apache here?

    Highest Regards
    Mohammed H

  6.     
    #5
    Member
    Website's:
    i-fresh.net
    Now, I 'm passing request to http://domain: port and nginx is working. And I can use my browser to access http://domain: port. So I think Apache is listening on that Port.

    Yes, If I use public IP, it works too.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. OVH & Reverse Proxy
    By simoestcoool in forum Hosting Discussion
    Replies: 7
    Last Post: 17th May 2012, 10:38 AM
  2. [Other] Reverse Proxy
    By inject0r in forum Archive
    Replies: 4
    Last Post: 29th Apr 2012, 10:28 AM
  3. Best Reverse Proxy
    By Webmin in forum Server Management
    Replies: 3
    Last Post: 2nd Apr 2012, 06:59 PM
  4. What is Reverse Proxy ?
    By iq2011 in forum Hosting Discussion
    Replies: 28
    Last Post: 27th Mar 2012, 06:56 PM
  5. Reverse Proxy Service
    By Inforcer in forum Webmaster Discussion
    Replies: 9
    Last Post: 17th Dec 2011, 04:34 AM

Tags for this Thread

BE SOCIAL