0

Following is my /etc/nginx/sites-enabled/default now i have installed nodejs to run an app on port 8080.

I dont want nginx to redirect any requests to port 80, i want to use http instead of https

server {

listen 443 ssl spdy;
ssl on;
ssl_certificate /ssl.crt;
ssl_certificate_key /ssl.key; 

root /var/www/html;
index index.php index.html index.htm;

location / {
try_files $uri @rewrite;
}
location @rewrite {
rewrite ^ /index.php;
}

location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}

}

server {
server_name www.xxxx.com xxxx.com;
return 301 https://xxxx.com$request_uri;
}
niksmac
  • 2,667
  • 3
  • 34
  • 50

1 Answers1

0

To access your nodejs on port 80 (www.xxxx.com or xxxx.com):

server {
    listen 80;
    server_name www.xxxx.com xxxx.com;
    location / {
        proxy_pass http://127.0.0.1:8080;
    }
}
kostans3k
  • 457
  • 6
  • 13