• I have a wordpress blog setup on apache2 (port 80) on Ubuntu 12.04, I also have a nginx setup listening on port 8080 serving the same blog. My problem is, whenever I try to open the blog on port 8080, nginx redirects the requests to apache which shouldn’t happen. I’m posting the contents of /etc/nginx/sites-enabled/wordpress

    server {
        listen   8080;
    
        root /var/www;
        index index.php index.html index.htm;
    
        server_name foobartech.strangled.net:8080;
    
        location / {
                try_files $uri $uri/ /index.php?q=$uri&$args;
        }
    
        location /doc/ {
                alias /usr/share/doc/;
                autoindex on;
                allow 127.0.0.1;
                deny all;
        }
    
        error_page 404 /404.html;
    
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
                root /usr/share/nginx/www;
        }
    
        location ~ \.php$ {
    
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                fastcgi_param   SERVER_PORT 8080;
                port_in_redirect off;
        }

    I have also set cgi.fix_pathinfo=0

    in /etc/php5/fpm/php.ini

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Why is nginx redirecting requests on port 8080 to port 80(apache)’ is closed to new replies.