링크 ux 아래 nginx + ftp 에 이미지 서버 를 구축 하여 이 컴퓨터 에 접근 하 는 데 403 오류 가 발생 하 는 해결 방법

2045 단어 상점 을 일구다
nginx + ftp 구축 이미지 서버 수정 nginx 프로필 중 루트 경로 403 오류
프로필 디 렉 터 리 에 들 어가 기
cd /usr/local/nginx/conf/

nginx + ftp 구축 이미지 서버 수정 nginx 프로필 중 루트 경로 403 오류
nginx 의 기본 설정 파일 nginx. config 두 곳 을 변경 합 니 다:
user  root;  #루트 사용자 나 nginx 에 대응 하 는 사용자 worker 로 변경processes  1;#error_log  logs/error.log;#error_log  logs/error.log  notice;#error_log  logs/error.log  info;#pid        logs/nginx.pid;events {    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  logs/access.log  main;    sendfile        on;    #tcp_nopush     on;              #keepalive_timeout  0;    keepalive_timeout  65;             #gzip  on;    server {         listen       80;        server_name  localhost;        #charset koi8-r;             #access_log  logs/host.access.log  main;        location / {             root   /home/ftpuser/www/;  #서버 의 기본 사이트 루트 디 렉 터 리 위 치 를 정의 합 니 다.             index  index. html index. htm; \ # 첫 페이지 색인 이름 정의                       }        #error_page  404              /404.html;"nginx.conf" [readonly] 118L, 2684C            
위 설정 을 완료 하면 됩 니 다! (ftp 서비스 가 열 렸 다 면 포트 번호 21 도 열 어야 합 니 다. 포트 21 은 ftp 서버 의 포트 번호 이기 때 문 입 니 다)
작은 지식 추가: vsftpd 서비스 시작 / 재 시작 / 정지 (ftp 서비스 시작) Red Hat Linux 9.0 부터 vsftpd 기본 값 은 standalone 방식 으로 vsftpd 서 비 스 를 시작 합 니 다. 방법 은 터미널 명령 창 에서 다음 명령 을 실행 하 는 것 입 니 다.   [root@ahpeng root] /etc/rc.d/init.d/vsftpd start vsftpd 서 비 스 를 다시 시작 합 니 다:   [root@ahpeng root] /etc/rc.d/init.d/ vsftpd restart vsftpd 서비스 닫 기:   [root@ahpeng root] /etc/rc.d/init.d/ vsftpd stop

좋은 웹페이지 즐겨찾기