0

I'm trying to use nginx as a proxy so that http://stuff.theanti9.com/ goes to a seperate computer and everything else goes to a local instance of apache (which would be accessed by http://theanti9.com or http://www.theanti9.com). I tried configuring it, but when i go to my domain, I just get the "Welcome to nginx!". Here's what I have:

user www-data;
worker_processes  1;

error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;



    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;

    include /etc/nginx/conf.d/*.conf;
    server {
           listen 80;
           server_name theanti9.com www.theanti9.com;
       access_log   /var/log/nginx/access.log;
           location / {
                proxy_pass http://localhost:8000;
           }
    }

    server {
           listen 80;
       server_name stuff.theanti9.com;
       access_log   /var/log/nginx/access.log;
       location / {
            proxy_pass http://192.168.1.102:80;
       }
    }
}

I'm not really sure what's wrong. Any suggestions?

2
  • Could you try rephrasing this into something more coherent? I tried understanding it but couldn't manage. May 19, 2010 at 3:43
  • Ok I tried to rephrase a little better at the bottom.
    – The.Anti.9
    May 19, 2010 at 3:50

1 Answer 1

0

check the files inside /etc/nginx/conf.d. Something might've overridden your settings

1
  • conf.d is empty.
    – The.Anti.9
    May 19, 2010 at 5:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.