티스토리 뷰
http://stackoverflow.com/a/19302688
server {
server_name www.mysite2.name;
return 301 $scheme://mysite2.name$request_uri;
}
server {
#This config is based on https://github.com/daylerees/laravel-website-configs/blob/6db24701073dbe34d2d58fea3a3c6b3c0cd5685b/nginx.conf
server_name mysite2.name;
# The location of our project's public directory.
root /usr/share/nginx/mysite2/live/public/;
# Point index to the Laravel front controller.
index index.php;
location / {
# URLs to attempt, including pretty ones.
try_files $uri $uri/ /index.php?$query_string;
}
# Remove trailing slash to please routing system.
if (!-d $request_filename) {
rewrite ^/(.+)/$ /$1 permanent;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}'OS-서버-서비스 > NginX' 카테고리의 다른 글
| Nginx open source 에 ModSecurity v3 웹방화벽 모듈 설치 (0) | 2018.04.11 |
|---|---|
| NginX PHP CORS 설정 (0) | 2016.05.02 |
| NginX + php-fpm 설치, 셋팅 (링크) (0) | 2015.12.08 |
| 웹폰트를 위한 nginx 서버 CORS 허용 Header 설정 (0) | 2015.09.24 |
댓글
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- Mac
- nodejs
- Android
- ASP
- IOS
- sencha touch
- centos
- macos
- Linux
- IE
- laravel
- PHP
- Docker
- mssql
- CSS
- Debug
- classic asp
- iphone
- JQuery
- nginx
- 워드프레스
- Prototype
- git
- 안드로이드
- 한글
- API
- Wordpress
- JSON
- javascript
- iis
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함