virtual Host + socket.io Error 404 - Node.js

1

Hi, I have a problem and I have a connection to my server.js (I'm not in my local, localhost perfect function) I'm using node.js and use socket.io for the results of my requests, the detail is that on my local server I can not use localhost / and I need to access my websockets from the outside. I have tried to create a vhost, to access it but it gives me error 404. when I execute the client that makes the request.

server.js

var express = require('express');  
var app = express(); 
var vhost = require( 'vhost' );  
var connect = require( 'connect' ); 
app.use(vhost('demo.dominiouno.com', express.static( appconnect )));  

htvhost.conf (I created this virtual host in my apache, but it does not work)

<VirtualHost *:3003>
  ServerName demo.dominiouno
  DocumentRoot "C:\xampp\htdocs\u2b2b\sockets\server"
 <Directory "C:\xampp\htdocs\u2b2b\sockets\server">
 AllowOverride all
</Directory>    
ProxyRequests on
ProxyPass / http://demo.dominiouno:3003/
ProxyPassReverse / http://localhost:3003/  
</VirtualHost>
    
asked by cadayazu 03.08.2017 в 00:02
source

0 answers