New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win10系统hexo s以后http://localhost:4000打不开本地服务器 #1568

Closed
luodaoyi opened this Issue Oct 28, 2015 · 33 comments

Comments

@luodaoyi
Copy link

luodaoyi commented Oct 28, 2015

不知道为啥

状态图
hexo版本
打不开
打不开
打不开
系统版本

@luodaoyi

This comment has been minimized.

Copy link

luodaoyi commented Oct 28, 2015

#hosts文件
hosts文件

@luodaoyi

This comment has been minimized.

Copy link

luodaoyi commented Oct 28, 2015

部署的时候出现这个问题
截图

@Xuanwo

This comment has been minimized.

Copy link
Contributor

Xuanwo commented Oct 30, 2015

初步判断是hexo与nodejs 4的兼容性问题- -
事实证明初步判断是错的= =

@iissnan

This comment has been minimized.

Copy link

iissnan commented Oct 30, 2015

应该不是 兼容性问题,因为我在 Windows 10 下可正常使用 Hexo (Node.js)版本是 4。报 source.replace 出错,很有可能是解析 source 的时候出错了。试试检查下文章(*.md)是否有可疑的问题。

最简单的方式,将你当前 source 目录下的所有 md 文件剪切到别的地方,然后新建一篇简单的 post,快速验证下是否是文章的问题。

@luodaoyi

This comment has been minimized.

Copy link

luodaoyi commented Oct 30, 2015

首页都不出来 我在MAC下各种正常

@luodaoyi

This comment has been minimized.

Copy link

luodaoyi commented Oct 31, 2015

重新建了新文档只执行

hexo init
hexo install
hexo s

问题依旧依然是 无法显示此页面

@leesei leesei added the need-verify label Nov 10, 2015

@Xuanwo

This comment has been minimized.

Copy link
Contributor

Xuanwo commented Dec 1, 2015

@luodaoyi #1568 (comment) 这个回复里面的hexo install 是你打错了么?

@ccc013

This comment has been minimized.

Copy link

ccc013 commented Jan 20, 2016

@luodaoyi 你好,我想问下你有没有解决这个问题,因为我用的也是win10系统,在运行hexo s这个命令后,输入localhost:4000,或者是http://0.0.0.0:4000/,也是显示无法显示网页的。

@houzi-

This comment has been minimized.

Copy link

houzi- commented Feb 3, 2016

@ccc013其实你可以尝试换一下端口

@williamstar

This comment has been minimized.

Copy link

williamstar commented Feb 15, 2016

@luodaoyi @ccc013 我也遇到这个问题,我是这样解决的。 hexo s -p 3600 换一个3600的端口号就可以了,如果0.0.0.0不可以就用127.0.0.1

@qiumuch

This comment has been minimized.

Copy link

qiumuch commented Mar 27, 2016

github改成git

https改成http

@fych

This comment has been minimized.

Copy link

fych commented Apr 5, 2016

@williamstar 谢谢你,你解决了困扰我很久的问题,果然换了一下端口号就好了。
@iissnan ,我想问一下你不需要换端口号都可以吗,我试了好久,只有更换端口号才能解决这个问题。hexo在win10上好奇怪。

@Xuanwo

This comment has been minimized.

Copy link
Contributor

Xuanwo commented Apr 6, 2016

@fych 肯定不是win10的问题,可能你本地占用了这个端口之类的

@iissnan

This comment has been minimized.

Copy link

iissnan commented Apr 6, 2016

@fych 我这边没有问题。

@leesei leesei closed this Apr 18, 2016

@JackyLauwj

This comment has been minimized.

Copy link

JackyLauwj commented Jul 31, 2016

@Xuanwo @iissnan @williamstar @luodaoyi
default
哈喽各位,我自己鼓捣hexo很长时间了,每次出错我都是删了本地文件同时把github上的也删了。
按照google上能看的方法都看了,我对照各个方法都试过还是有两个问题解决不了。
问题一:如图所示我启动本地服务还是打不开本地端口
问题二:jackylauwi.com 这是我的博客网站,不管怎么上传同步更换主题,一直是这个老样子。这个根本就跟hexo没有关系,一直是github负责修改的,但是我安装hexo这些半天了还是解决不了

@skjgithub950423

This comment has been minimized.

Copy link

skjgithub950423 commented Jul 31, 2016

我也是同样的问题 你解决了么?

@skjgithub950423

This comment has been minimized.

Copy link

skjgithub950423 commented Jul 31, 2016

@JackyLauwj

This comment has been minimized.

Copy link

JackyLauwj commented Jul 31, 2016

@skjgithub950423 没有啊,不知道问题出在哪里。。。。。

@skjgithub950423

This comment has been minimized.

Copy link

skjgithub950423 commented Aug 1, 2016

用ie试一下,我的用ie打开就好了

@JackyLauwj

This comment has been minimized.

Copy link

JackyLauwj commented Aug 1, 2016

@skjgithub950423
还有就是我现在的博客地址Jackylauwj.com绑定了GitHub。我把hexo也安装了,主题也都换了。但页面还是那样子———GitHub Page。我如果只是想把博客做成这个样子根本连hexo都用不到,我把ssh key也和本地绑定了,实在没办法了。。。。。。

@Xuanwo

This comment has been minimized.

Copy link
Contributor

Xuanwo commented Aug 1, 2016

你能不能先把代理关了?

@JackyLauwj

This comment has been minimized.

Copy link

JackyLauwj commented Aug 1, 2016

@Xuanwo
那个端口地址打不打开不重要,问题我的博客现在只显示GitHub Page的。。。到底哪里出了问题。

@jm0477

This comment has been minimized.

Copy link

jm0477 commented Sep 15, 2016

@williamstar 正解,我也碰到这个问题了, win10系统,默认4000打不开。关掉防火墙也不行,换个端口就行了。。

@1PxUp

This comment has been minimized.

Copy link

1PxUp commented Oct 19, 2016

如果用了代理,关掉试试,比如Shadowsocks. 我遇到的情况是chrome打不开,ie可以打开。

@meiyuesheng

This comment has been minimized.

Copy link

meiyuesheng commented Dec 19, 2016

感谢@williamstar ,是默认端口被占用,查看了下发现是Foxit阅读器的一个进程,默认端口被占用也不报错,建议作者给个提示。

@leiyunhe

This comment has been minimized.

Copy link

leiyunhe commented Jan 10, 2017

@williamstar 感谢感谢。换了个端口可以了。

@1162436661

This comment has been minimized.

Copy link

1162436661 commented Feb 15, 2017

我的关掉也没有用,我的firefox一直显示:Firefox 无法建立到 localhost:4000 服务器的连接,切换端口都没有用,请问你们怎么解决的

@guili618

This comment has been minimized.

Copy link

guili618 commented Apr 3, 2017

感谢@williamstar,win7下面用先用netstat -aon|findstr "4000"看了下,hexo的服务没有启动之前,确实4000端口已经被占用了,用 hexo s -p 端口号 解决了,谢谢

@daohewang

This comment has been minimized.

Copy link

daohewang commented May 26, 2017

hexo clear之后本来正常运行的localhost:4000服务器就失效了,求解

@heliuphy

This comment has been minimized.

Copy link

heliuphy commented May 28, 2017

真的换下端口接好了~!非常感谢

@gaotingqi

This comment has been minimized.

Copy link

gaotingqi commented Jan 25, 2018

换了端口也不行呀,检查了一下4000端口就是被hexo用着呢,该如何解决?

@Andywang089

This comment has been minimized.

Copy link

Andywang089 commented Feb 4, 2018

Git中Ctrl + C是stop的快捷键,不要使用Ctrl + C或Ctrl + V的快捷键,用右键。

@Andywang089

This comment has been minimized.

Copy link

Andywang089 commented Feb 4, 2018

hexo s 后如果使用 Ctrl + C和Ctrl + V到浏览器访问肯定会无法访问,因为Ctrl + C会停止 server。
Git中Ctrl + C是stop的快捷键,不要使用Ctrl + C或Ctrl + V的快捷键,用右键。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment