thunder1902
Posts: 2
Joined: Fri Nov 16, 2012 8:29 am

noVNC with Nginx

Tue May 26, 2015 1:07 pm

Hello!

I would like to make a VNC-Connection over my Browser to my RPI.
I made it like this Tutorial:
https://github.com/kanaka/noVNC/wiki/Pr ... with-nginx

The tightvncserver i installed like this Tutorial:
viewtopic.php?f=99&t=81165

My nginx-Configuration is:

Code: Select all

upstream vnc_proxy {                                                                                            
server 127.0.0.1:6080;                                                                                          
}                                                                                                               


server {                                                                                                        
        listen 80;                                                                                              
#        server_name $domain_name;                                                                             $
        server_name email.kaimlinge.de;                                                                         
#       server_name localhost;
        root /var/www/internet;
        index index.html index.htm index.php vnc.html;
        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;

        location ~\.php$ {                                                                                      
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_split_path_info ^(.+\.php)(/.*)$;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;                               
                fastcgi_param HTTPS off;                                                                        
                try_files $uri =404;                                                                            
                include fastcgi_params;                                                                         
        }               
                                                                                                     

location /vncws/ {                                                                                              
          proxy_pass http://vnc_proxy;
          proxy_http_version 1.1;                                                                               
          proxy_set_header Upgrade $http_upgrade;                                                               
          proxy_set_header Connection "upgrade";
    }        
I start the websockify with this:

Code: Select all

sudo /<novnc-Directory>/utils/launch.js --vnc localhost:5901
The tightvncserver is listening on 5901. I i make

Code: Select all

netstat -nlp
, it shows:

Code: Select all

tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN      4180/Xtightvnc 
Now, if i go to <myURL>/novnc, the VNC-Screen comes. (like this: http://kanaka.github.io/noVNC/noVNC/vnc.html)
When i write Host, Port (80) and Password in the Fields, nothing happens. The Websockify says:

Code: Select all

127.0.0.1 - - [26/May/2015 14:46:56] 127.0.0.1: Plain non-SSL (ws://) WebSocket connection                      
127.0.0.1 - - [26/May/2015 14:46:56] 127.0.0.1: Version hybi-13, base64: 'False'                                
127.0.0.1 - - [26/May/2015 14:46:56] 127.0.0.1: Path: '/vncws/:80/websockify'                                   
127.0.0.1 - - [26/May/2015 14:46:56] connecting to: localhost:5901 
Not more...

What can i do? Iam out of ideas......

Where can help me??

Return to “Raspberry Pi OS”