nginx 80 포트 가 'welcome to nginx' 환영 인터페이스 에 점용 되 어 사용 할 수 없습니다.
1691 단어 nginx
nginx 설정 은 80 포트 를 사용 하여 환영 페이지 로 자동 으로 이동 합 니 다 (welcome to nginx!). 그러나 다른 포트 는 정상적으로 사용 할 수 있 습 니 다.
해결 방법:
프로필 디 렉 터 리:
/etc/nginx/sites-enables/
이 디 렉 터 리 아래 에 자신 이 쓴 프로필 제외 (×××.conf) 외 에 default 파일 이 하나 더 있 습 니 다. 이 파일 은 기본 으로 불 러 온 프로필 입 니 다. 이 default 파일 을 편집 하고 열 면 다음 과 같 습 니 다.
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as reference inside of sites-available where it will continue to be
# updated by the nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or Wordpress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
listen 80 default_server; ## 80 ,
listen [::]:80 default_server; ## 80 ,
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
환영 페이지 의 기본 값 이 80 포트 에 의 해 점용 되 고 다른 포트 로 바 꾸 면 점용 되 는 문 제 를 해결 할 수 있 습 니 다.
마지막 으로 kill pid, nginx 를 다시 시작 하고 url 을 입력 하면 문제 가 해 결 됩 니 다.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
간단! Certbot을 사용하여 웹 사이트를 SSL(HTTPS)화하는 방법초보자가 인프라 주위를 정돈하는 것은 매우 어렵습니다. 이번은 사이트를 간단하게 SSL화(HTTP에서 HTTPS통신)로 변경하는 방법을 소개합니다! 이번에는 소프트웨어 시스템 Nginx CentOS7 의 환경에서 S...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.