Skip to content
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

GCP安装后,mydomain.com可以访问,www.mydomain.com不能访问,也无法下载配置文件等等 #43

Open
Jack-ban opened this issue Jun 12, 2019 · 3 comments

Comments

@Jack-ban
Copy link

我是在GCP的debian9上安装的脚本。开放所有入站端口后运行脚本,也正常输出了配置。
系统信息

Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64

域名解析已经检测过没有问题。
目前的情况是:

  • 访问mydomain.com跳转到nginx默认页面,说明80端口的http访问正常,对主机的端口探测也证实了这一点。
  • 访问www.mydomain.com时,无法访问。端口探测443也显示未开放。
    我根据这个推测是nginx服务器的问题。
    输入命令systemctl status nginx,显示如下:
● nginx.service - nginx - high performance web server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-06-12 12:30:10 UTC; 30min ago
     Docs: http://nginx.org/en/docs/
  Process: 687 ExecStart=/usr/sbin/nginx -c /etc/nginx/nginx.conf (code=exited, status=0/SUCCESS)
 Main PID: 709 (nginx)
    Tasks: 2 (limit: 4915)
   CGroup: /system.slice/nginx.service
           ├─709 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
           └─710 nginx: worker process

Jun 12 12:30:10 chengzhang systemd[1]: Starting nginx - high performance web server...
Jun 12 12:30:10 chengzhang systemd[1]: nginx.service: PID file /var/run/nginx.pid not readable (yet?) after start: No s
uch file or directory
Jun 12 12:30:10 chengzhang systemd[1]: Started nginx - high performance web server.

说是pid文件找不到,我确认过该目录下是存在该文件的。网上找了半天,出现该问题的连nginx都没法启动,我这个居然启动后还报这个错。
再看v2ray的状态,似乎没什么问题。各位也帮忙参考一下。

● v2ray.service - V2Ray Service
   Loaded: loaded (/etc/systemd/system/v2ray.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-06-12 12:30:10 UTC; 30min ago
 Main PID: 688 (v2ray)
    Tasks: 7 (limit: 4915)
   CGroup: /system.slice/v2ray.service
           └─688 /usr/bin/v2ray/v2ray -config /etc/v2ray/config.json

Jun 12 12:30:10 chengzhang systemd[1]: Started V2Ray Service.
Jun 12 12:30:10 chengzhang v2ray[688]: V2Ray 4.19.1 (Let's Fly) Custom
Jun 12 12:30:10 chengzhang v2ray[688]: A unified platform for anti-censorship.
Jun 12 12:30:11 chengzhang v2ray[688]: 2019/06/12 12:30:11 [Warning] v2ray.com/core: V2Ray 4.19.1 started

搞了半天,不知道该往何处排查问题了。@dylanbai8

@Miaooo92
Copy link

@blackjack0v0 我遇到了跟 @Jack-ban 一样的问题。
检查了nginx 的配置,这个脚本是自动生成了v2ray.conf文件的。
内容跟你写的一样,位置放在/etc/nginx/conf.d/v2ray.conf
可见不是nginx 的问题

@yang9w
Copy link

yang9w commented Sep 14, 2019

是配置文件的问题。但是那里出错了还不知道。不用域名是可以连接的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@Miaooo92 @Jack-ban @yang9w and others