Notice
														
												
											
												
												
													Recent Posts
													
											
												
												
													Recent Comments
													
											
												
												
													Link
													
											
									| 일 | 월 | 화 | 수 | 목 | 금 | 토 | 
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | 
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | 
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | 
| 30 | 
													Tags
													
											
												
												- codeigniter
 - html
 - Eclipse
 - 공모주 청약 일정
 - JavaScript
 - 제이쿼리
 - 자바스크립트
 - Stock
 - 자바
 - 맥
 - css
 - 6월 공모주 청약 일정
 - linux
 - java
 - Stock ipo
 - 공모주 청약
 - MYSQL
 - 리눅스
 - 주식 청약
 - 공모주
 - Oracle
 - 코드이그나이터
 - 주식
 - php
 - jquery
 - SQL
 - 7월 공모주 청약 일정
 - 오라클
 - IPO
 - 주식 청약 일정
 
													Archives
													
											
												
												- Today
 
- Total
 
개발자의 끄적끄적
[php/nginx] nginx codeigniter 설정 본문
728x90
    
    
  반응형
    
    
    
  [php/nginx] nginx codeigniter 설정
Nginx에서 CodeIgniter를 위한
nginx.conf 파일 설정
server {
    listen 80; # IPv4
    server_name localhost;
    ## Parametrization using hostname of access and log filenames.
    access_log logs/localhost_access.log;
    error_log logs/localhost_error.log;
    ## Root and index files.
    root html;
    index  index.php index.html index.htm;
    ## If no favicon exists return a 204 (no content error).
    location = /favicon.ico {
        try_files $uri =204;
        log_not_found off;
        access_log off;
    }
    ## Don't log robots.txt requests.
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }
    ## Try the requested URI as files before handling it to PHP.
    location / {
        ## Regular PHP processing.
        location ~ \.php$ {
            try_files  $uri =404;
            fastcgi_pass   php_processes;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
        ## Static files
        location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf)$ {
            expires max;
            log_not_found off;
            ## No need to bleed constant updates. Send the all shebang in one
            ## fell swoop.
            tcp_nodelay off;
            ## Set the OS file cache.
            open_file_cache max=1000 inactive=120s;
            open_file_cache_valid 45s;
            open_file_cache_min_uses 2;
            open_file_cache_errors off;
        }
        ## Keep a tab on the 'big' static files.
        location ~* ^.+\.(?:ogg|pdf|pptx?)$ {
            expires 30d;
            ## No need to bleed constant updates. Send the all shebang in one
            ## fell swoop.
            tcp_nodelay off;
        }
    } # / location
    # .htaccess 파일의 기능을 수행 ( 위에 열거한 정적 파일 외의 접근 파일은 다 index.php로 연결 )
    if (!-e $request_filename ) {
          rewrite ^(.*)$ /index.php last;
    }
} 
반응형
    
    
    
  '개발 > php' 카테고리의 다른 글
| [php] nginx / codeigniter index.php 죽이기 설정 참고 URL (0) | 2020.09.18 | 
|---|---|
| [php] nginx index.php 제거 방법 (0) | 2020.09.17 | 
| [php] 두 좌표간 거리 계산 함수 (0) | 2020.09.10 | 
| [php] 추천인 코드 생성 함수 (0) | 2020.09.08 | 
| [php] 그누보드 메일 발송하기 [펌] (0) | 2020.09.08 | 
								  Comments
								
							
						
					
                    
                
					
					
					
					
					
					
				