Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have got nginx to reverse proxy any requests to to apache. It all works fine, and I installed wordpress on the url "". The weird thing is that if you type in the url "" you get a connection timed out error, but if you type in "" with the trailing slash, it connects fine. Why does it do this?

edit: sorry here is the nginx config

    location / {
            proxy_set_header   Host             $host;
            proxy_set_header   X-Real-IP        $remote_addr;
            proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
            proxy_max_temp_file_size 0;

            client_max_body_size       10m;
            client_body_buffer_size    128k;

            proxy_connect_timeout      90;
            proxy_send_timeout         90;
            proxy_read_timeout         90;

            proxy_buffer_size          4k;
            proxy_buffers              4 32k;
            proxy_busy_buffers_size    64k;
            proxy_temp_file_write_size 64k;

I copied most of that from somewhere, not sure where...

for apache, all I did was change

NameVirtualHost *:8078
Listen 8078

in the ports.conf file.

I also editied sites-available/default and put

<VirtualHost *:8078>

on the top instead of

<VirtualHost *:80>

This is all on ec2 (ubuntu).

share|improve this question
Show you nginx config. – AlexD Aug 23 '11 at 6:05
Please post your Apache and nginx configuration files? – quanta Aug 23 '11 at 6:08

Without the trailing slash you are trying to be redirected, you should set a proxy_redirect sentence to resolve the issue. For example:

proxy_redirect http://localhost:8078/

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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