nginx conf 파일
server {
server_name domain.tld;
root /var/www/codeignitor;
index index.html index.php;
# set expiration of assets to MAX for caching
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
log_not_found off;
}
location / {
# Check if a file exists, or route it to index.php.
try_files $uri $uri/ /index.php;
}
location ~* \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
CodeIgniter application/config/config.php 파일에 수정
$config['base_url'] = "http://domain.tld/";
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";
이렇게 하면 index.php 없이 사용하는것이고, 작동은 무난히 잘 됨
출처 : http://wiki.nginx.org/Codeigniter
server {
server_name domain.tld;
root /var/www/codeignitor;
index index.html index.php;
# set expiration of assets to MAX for caching
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
log_not_found off;
}
location / {
# Check if a file exists, or route it to index.php.
try_files $uri $uri/ /index.php;
}
location ~* \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
CodeIgniter application/config/config.php 파일에 수정
$config['base_url'] = "http://domain.tld/";
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";
이렇게 하면 index.php 없이 사용하는것이고, 작동은 무난히 잘 됨
출처 : http://wiki.nginx.org/Codeigniter
'Digital Life > 만드는 이야기' 카테고리의 다른 글
OS X 10.7/10.8에서 Python의 과학/수학 모듈이 제대로 작동하지 않을 때 (Numpy, Scipy, Matplotlib, iPython, Pandas, Statsmodels, PyMC) (0) | 2013.01.21 |
---|---|
CentOS netatalk 2.2.4 에서 PAM_Error: Module is unknown 발생시 (0) | 2013.01.01 |
CodeIgniter 용 nginx rewrite rule (0) | 2012.12.31 |
Filezilla에서 GnuTLS error -12: A TLS fatal alert has been received 가 뜨는 경우 (0) | 2012.12.31 |
페이스북이 / 트위터가 아이폰 알림센터에 안떠요 (0) | 2012.12.30 |
[*nix] gcc 컴파일 중 __gmp_get_memory_functions 나타났을 때 (0) | 2012.12.28 |