[NginX] 설정

/etc/nginx/conf.d/ 아래에 XXXX.conf 파일을 만들면 됨

    사이트가 여러개라면 도메인별로 만드는 것이 좋습니다.


NGINX 재시작

systemctl restart nginx


  재시작시 에러가 나는 경우 

    systemctl status nginx

  로 확인



conf파일을 만드는 경우 server block만 만들면 됨

server {

        listen  80;

        server_name 도메인.com www.도메인.com;

 

        root            도메인루트폴더;

        index           index.php index.html;

 

        access_log     로그폴더/도메인이름.access.log;

        error_log      로그폴더/도메인이름.error.log;

 

        location / {

                # Check if a file or directory index file exists, else route it to index.php.

                try_files $uri $uri/ /index.php;

        }

 

        # uri가 있는 경우

        location uri {

                try_files $uri $uri/ /index.html;

        }

 

        # PHP reverse proxy 설정

        location ~* \.php$ {

                fastcgi_pass 127.0.0.1:9000;

                include fastcgi.conf;

        }

}


0
0
이 글을 페이스북으로 퍼가기 이 글을 트위터로 퍼가기 이 글을 카카오스토리로 퍼가기 이 글을 밴드로 퍼가기
captcha
자동등록방지 숫자입력

웹개발

번호 제목 글쓴이 날짜 조회수
2 HTML 특수문자 리스트 최고관리자 08-08 1,405
1 유니코드 특수문자 리스트 최고관리자 08-08 1,451