Tag: 端口

403成功安装Ghost后禁止

我花了几天的时间来搞清楚如何安装病毒Ghost平台,并经历了无数的错误。 幸运的是,我已经设法安装它 – Ghost在我完成npm start –production后给了我一个正面的Ghost is running…消息。 但是,当我浏览到我的网站 – http://nick-s.se – Apache显示其默认页面,当我去到幽灵login区域 – /鬼,该网站返回403 Forbidden。 PS我已经特别安装在不同的端口上运行的Apache的Ghost。 我不知道发生了什么事… 更新 – 我发现我可以通过添加我在config.js中configuration的端口号2368来访问我的Ghost安装。 现在,但是我的问题是 – 如何运行Ghost而不使用这些端口?

在URL中的pump.io端口

我只是在我的服务器(CentOS 6.5,x64)上安装了pump.io ,而且我的服务器上还有一个Ghost博客(blog.mydomain.example),它位于Apache后面。 我的网站的主页是一个静态的HTML页面。 现在的问题是:当我访问social.mydomain.example时,我会被redirect到我的博客(URL仍然是social.mydomain.example)。 我只能访问pump.io通过inputsocial.mydomain.example:31337和用户链接将像social.mydomain.example:31337 /testing。 我怎样才能使端口号消失在URL和访问pump.io通过social.mydomain.example? 谢谢! 以下是我的服务器上的一些configuration: Apache主机设置: <VirtualHost *:80> ServerName blog.mydomain.example ProxyPreserveHost on ProxyPass / http://127.0.0.1:2368/ </VirtualHost> <VirtualHost *:80> ServerName mydomain.example ServerAlias www.mydomain.example ProxyRequests off DocumentRoot /var/www/html </VirtualHost> 我如何安装pump.io cd /usr/bin/nodejs/ git clone https://github.com/e14n/pump.io.git cd pump.io npm install cd pump.io/node_modules/databank npm install databank-mongodb cd /usr/bin/nodejs/pump.io/bin forever start pump 我的pump.ioconfiguration cat /etc/pump.io.json […]

服务器在8080上运行,但浏览器说网页不可用

我遵循本教程( http://www.hongkiat.com/blog/node-js-server-side-javascript/ ),并在运行下一个脚本(用于创build静态服务器)时,命令提示符显示“服务器正在运行在端口8080“,但当试图访问它在本地主机:8080我刚刚得到一个网页是不可用的错误。 我已经在防火墙中允许访问8080。 什么可能导致这个? 我应该试图从另一个地址访问页面? 当我尝试访问该页面时,我在cmd中收到以下错误消息: C:\Users\id122302\Documents\test.js:11 path.exists(full_path,function(exists) ^ TypeError: undefined is not a function at Server.<anonymous> (C:\Users\id122302\Documents\test.js:11:7) at Server.emit (events.js:110:17) at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:491:12) at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23) at Socket.socketOnData (_http_server.js:343:22) at Socket.emit (events.js:107:17) at readableAddChunk (_stream_readable.js:163:16) at Socket.Readable.push (_stream_readable.js:126:10) at TCP.onread (net.js:538:20) 这是我的代码: var sys = require("sys"); my_http = require("http"); path = […]

如何杀死重启的进程? (永远)

我想我不小心在某处安装了Foreverjs并启动了它。 每当我杀死这个过程,另一个取代它 ] 1 我不知道永远在哪里(或者如果这实际上是什么造成的),因为我在本地安装。

node-serialport不会列出也不检测连接到笔记本电脑的USB设备

我正在使用Electron和node-serialport构build一个应用程序,并且我没有将USB设备连接到笔记本电脑(例如:鼠标,扬声器) 我正在使用这个代码: var SerialPort = require('serialport'); SerialPort.list(function (err, results) { if (err) { throw err; } console.log("Number of results : " + results.length); }); 输出Number of results : 0 。 当我检查我的Device Manager : 这是我的configuration: 电子 : 1.4.5 SerialPort版本 : 4.0.5 NodeJS版本 : 6.9.1 操作系统和硬件平台 : Windows 8.1 / 64 bits

Node.js是应用程序不侦听指定的端口

我指定的端口30000,但应用程序结束了在不同的端口上收听。 这是我正在使用的代码: var express = require('express'); var bodyParser = require('body-parser'); var path = require('path'); var app = express(); app.get('/', function(req, res) { res.send('Hello World'); }); app.listen(30000, function() { console.log('Server started on port %d', app.listen().address().port); }); 应用程序正在侦听的端口在运行时被设置为不同的值。 如果我使用它在浏览器中login到控制台的值,它将正常工作。 非常感谢!

在Docker容器中打开端口

我试图在一个Docker容器中以debugging模式运行node.js应用程序,并将另一个容器中的debugging器附加到在第一个容器中运行的应用程序中。 因此,我试图打开端口5858到外面的世界。 但是,当我–link另一个容器连接到第一个容器(带有别名firstContainer ),并运行nmap -p 5858 firstContainer ,我发现5858端口是closures的。 第一个容器告诉我,node.js应用程序正在监听端口5858,我已经暴露了Dockerfile中的端口,并且还将端口绑定到了我机器上相应的端口(尽pipe我不是确定这是必要的)。 当我在端口8080上运行nmap时,一切都成功了。 如何打开Docker容器上的端口5858,以便可以将debugging器连接到此端口? Dockerfile是: FROM openshift/base-centos7 # This image provides a Node.JS environment you can use to run your Node.JS # applications. MAINTAINER SoftwareCollections.org <sclorg@redhat.com> EXPOSE 8080 5858 ENV NODEJS_VERSION 0.10 LABEL io.k8s.description="Platform for building and running Node.js 0.10 applications" \ io.k8s.display-name="Node.js 0.10" \ io.openshift.expose-services="8080:http" \ io.openshift.tags="builder,nodejs,nodejs010" […]

如何在同一个端口上使用node.js和php

我已经在端口12234上安装了node.js,socket.io和express.js,并且工作得非常好。 但是现在我想在该端口的一个页面上使用php(12234),但我不知道如何才能做到这一点。 有没有人有解决办法? 对不起我的英语不好,我是荷兰人,英语不太好。

如何为客户端设置Meteor WebSocket端口?

如何设置WebSocket将监听的端口? 我试图在OpenShift上部署Meteor,但是他们有一个nodejs-proxy服务器,它监听端口8000而不是80端口,并redirect到我的Meteor守护进程。 它正在工作,因为手动创build的WebSocket对象工作正常。 我已经设置ROOT_URL,但没有成功。 它出现在浏览器中,如下所示: process.env.ROOT_URL = 'http://' + process.env.OPENSHIFT_APP_DNS + ':8000' 我正在使用这个快速入门: https : //github.com/openshift-quickstart/openshift-meteorjs-quickstart 。 请参阅文件meteorshim.js以供参考。 一切正常,包括长期投票。

nodejs错误EADDRINUSE

我得到这个时,我键入“节点site.js”即时通讯100%肯定我没有运行这个节点两次。 Error: listen EADDRINUSE :::3000 at Object.exports._errnoException (util.js:1022:11) at exports._exceptionWithHostPort (util.js:1045:20) at Server._listen2 (net.js:1262:14) at listen (net.js:1298:10) at Server.listen (net.js:1376:9) at Server.listen.Server.attach (/root/node_modules/socket.io/lib/index.js:228:9) at Timeout._onTimeout (/root/nodejs/site.js:1005:29) at ontimeout (timers.js:365:14) at tryOnTimeout (timers.js:237:5) at Timer.listOnTimeout (timers.js:207:5) code: 'EADDRINUSE', errno: 'EADDRINUSE', syscall: 'listen', address: '::', port: 3000 } 我使用FEDORA 23