nginx拒绝访问
<code>前两天开了个aws免费一年的EC2,我就想买个域名搭个自己的博客练练手。前期都很顺利,可是在绑定域名的时候遇到了麻烦,访问网站时灵时不灵,日志里也看不到不出什么问题。折腾一天了也没什么进展,求各位大神救救俺。 下面是nginx.conf的内容,我还没有配虚拟主机。</code>
<code>user www; worker_processes 1; error_log /opt/modules/nginx/logs/error.log notice; #error_log logs/error.log notice; #error_log logs/error.log info; pid /opt/modules/nginx/logs/nginx.pid; events { use epoll; worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /opt/modules/nginx/logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80 default; #charset koi8-r; access_log /opt/modules/nginx/logs/access.log main; location / { root html; index index.php index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; } } }</code>
<code>日志里没有打印错误,我这里贴下浏览器报错吧: </code>
<code> 这个错误诡异在日志没有任何的报错,而且不同的浏览器访问网站情况还不一样。我用chrome访问的时候大概有十分之一的几率访问正常,用Safari的时候却有百分之50的几率访问正常,用IE压根不能正常访问。 网站地址是:http://gaochao.info </code>
<code>如果访问正常的话会显示nginx欢迎界面。大家也可以试试。 期初我怀疑是域名没能够正常解析,但后来我排除了这个可能。原因有两点:第一我试过直接修改hosts文件,问题没有任何改善。第二我在ping域名的时候: </code>
<code>这里显示域名已经被成功解析到我的ip了。所以应该不是解析的问题。 我已经试了各种方法了,还是没能解决这个问题。恳请各位大神救我脱离苦海啊!!!</code>
回复内容:
<code>前两天开了个aws免费一年的EC2,我就想买个域名搭个自己的博客练练手。前期都很顺利,可是在绑定域名的时候遇到了麻烦,访问网站时灵时不灵,日志里也看不到不出什么问题。折腾一天了也没什么进展,求各位大神救救俺。 下面是nginx.conf的内容,我还没有配虚拟主机。</code>
<code>user www; worker_processes 1; error_log /opt/modules/nginx/logs/error.log notice; #error_log logs/error.log notice; #error_log logs/error.log info; pid /opt/modules/nginx/logs/nginx.pid; events { use epoll; worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /opt/modules/nginx/logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server { listen 80 default; #charset koi8-r; access_log /opt/modules/nginx/logs/access.log main; location / { root html; index index.php index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; } } }</code>
<code>日志里没有打印错误,我这里贴下浏览器报错吧: </code>
<code> 这个错误诡异在日志没有任何的报错,而且不同的浏览器访问网站情况还不一样。我用chrome访问的时候大概有十分之一的几率访问正常,用Safari的时候却有百分之50的几率访问正常,用IE压根不能正常访问。 网站地址是:http://gaochao.info </code>
<code>如果访问正常的话会显示nginx欢迎界面。大家也可以试试。 期初我怀疑是域名没能够正常解析,但后来我排除了这个可能。原因有两点:第一我试过直接修改hosts文件,问题没有任何改善。第二我在ping域名的时候: </code>
<code>这里显示域名已经被成功解析到我的ip了。所以应该不是解析的问题。 我已经试了各种方法了,还是没能解决这个问题。恳请各位大神救我脱离苦海啊!!!</code>
其实看到连接被重置,99%就是被墙了!
AWS被墙了,你需要用代理才能访问。
我在东京, 使用chrome和safari均可以正常访问http://gaochao.info和http://52.196.247.234/
我使用IP Location查了一下你的IP(52.196.247.234), 地址在日本东京。我觉得网站间歇性抽风大概是因为被墙了...
换用国内云服务吧。或者使用Hexo搭建博客, 部署到Coding上, 完全免费, 且非常方便。
被墙了,翻墙可以访问。

핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

메모장++7.3.1
사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

드림위버 CS6
시각적 웹 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

뜨거운 주제











PHP는 주로 절차 적 프로그래밍이지만 객체 지향 프로그래밍 (OOP)도 지원합니다. Python은 OOP, 기능 및 절차 프로그래밍을 포함한 다양한 패러다임을 지원합니다. PHP는 웹 개발에 적합하며 Python은 데이터 분석 및 기계 학습과 같은 다양한 응용 프로그램에 적합합니다.

PHP는 웹 개발 및 빠른 프로토 타이핑에 적합하며 Python은 데이터 과학 및 기계 학습에 적합합니다. 1.PHP는 간단한 구문과 함께 동적 웹 개발에 사용되며 빠른 개발에 적합합니다. 2. Python은 간결한 구문을 가지고 있으며 여러 분야에 적합하며 강력한 라이브러리 생태계가 있습니다.

Linux 시스템의 5 가지 기본 구성 요소는 다음과 같습니다. 1. Kernel, 2. System Library, 3. System Utilities, 4. 그래픽 사용자 인터페이스, 5. 응용 프로그램. 커널은 하드웨어 리소스를 관리하고 시스템 라이브러리는 사전 컴파일 된 기능을 제공하며 시스템 유틸리티는 시스템 관리에 사용되며 GUI는 시각적 상호 작용을 제공하며 응용 프로그램은 이러한 구성 요소를 사용하여 기능을 구현합니다.

PHP는 1994 년에 시작되었으며 Rasmuslerdorf에 의해 개발되었습니다. 원래 웹 사이트 방문자를 추적하는 데 사용되었으며 점차 서버 측 스크립팅 언어로 진화했으며 웹 개발에 널리 사용되었습니다. Python은 1980 년대 후반 Guidovan Rossum에 의해 개발되었으며 1991 년에 처음 출시되었습니다. 코드 가독성과 단순성을 강조하며 과학 컴퓨팅, 데이터 분석 및 기타 분야에 적합합니다.

PHP는 웹 개발 및 컨텐츠 관리 시스템에 적합하며 Python은 데이터 과학, 기계 학습 및 자동화 스크립트에 적합합니다. 1.PHP는 빠르고 확장 가능한 웹 사이트 및 응용 프로그램을 구축하는 데 잘 작동하며 WordPress와 같은 CMS에서 일반적으로 사용됩니다. 2. Python은 Numpy 및 Tensorflow와 같은 풍부한 라이브러리를 통해 데이터 과학 및 기계 학습 분야에서 뛰어난 공연을했습니다.

phphassignificallyimpactedwebdevelopmentandextendsbeyondit

git 저장소 주소를 보려면 다음 단계를 수행하십시오. 1. 명령 줄을 열고 리포지토리 디렉토리로 이동하십시오. 2. "git remote -v"명령을 실행하십시오. 3. 출력 및 해당 주소에서 저장소 이름을 봅니다.
