Nginx error log - invalid local address
<p>I have a Amazon EC2 Server setup with Nginx 1.8.1 on port 80 and Apache 2.4 on port 8080.</p>

<p>My Nginx error log is filled with invalid local address "www.domain.com:80"</p>

<p>Can someone advise how to fix this error?</p>

<p>My domain.com under /etc/nginx/sites-enabled is as below</p>

<pre><code>server {
listen 80;
server_name domain.com www.domain.com;
root /home/domain/public_html/;
index index.php index.htm index.html;

location / {
            #try_files $uri $uri/ /index.php;
            #try_files $uri $uri/ $uri.php;
            try_files $uri $uri/ /index.php?/$request_uri;
}

location ~ \.php$ {
    proxy_bind $host:80;
    proxy_pass http://www.domain.com:8080;
    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_set_header X-Forwarded-Proto $scheme;
    add_header X-Cache-Status $upstream_cache_status;

    # Cache configuration
    proxy_cache my-cache;
    proxy_cache_valid 10s;
    proxy_no_cache $cookie_PHPSESSID;
    proxy_cache_bypass $cookie_PHPSESSID;
    proxy_cache_key "$scheme$host$request_uri";
}

    # Disable Cache for the file type html, json
    location ~* .(?:manifest|appcache|html?|xml|json)$ {
            expires -1;
    }

    # Enable Cache the file 30 days
    location ~* .(jpg|png|gif|jpeg|css|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ {
            proxy_cache_valid 200 120m;
            expires 30d;
            proxy_cache my-cache;
            #access_log off;
            add_header X-Cache-Status $upstream_cache_status;
    }

location ~ /\. {
    access_log off;
    log_not_found off;
    deny all;
}
</code></pre>

<p>}   </p>

<p>My domain.com under Apache Virtual Host is as below</p>

<pre><code>&lt;VirtualHost 172.31.xx.xxx:8080&gt;
    DocumentRoot /home/domain/public_html/
    ServerName domaine.com
    ServerAlias www.domain.com n1.domain.com
    ErrorLog /home/domain/logs/error_log
    CustomLog /home/domain/logs/access_log combined
    &lt;Directory /home/domain/public_html&gt;
            Options -Includes -ExecCGI
            AllowOverride All
    &lt;/Directory&gt;
</code></pre>

<p></p>