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 을 입력 하면 문제 가 해 결 됩 니 다.

좋은 웹페이지 즐겨찾기