링크 ux 에서 nignx phop 환경 구축

768 단어
ngnx php 5 php 5 - fpm php 5 - cgi 설치
그 다음
/etc/nginx/sites-enabled/default
server {
    listen 80 default_server;
    listen [::]:80 default_server ipv6only=on;

    root /usr/share/nginx/html/public;
    index index.php;

    # Make site accessible from http://localhost/
    server_name ourdomain.com;

    location @handler {
        rewrite / /index.php
    }

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ .php$ {
        fastcgi_split_path_info ^(.+.php)(/.+)$;
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        # add the following line in for added security.
        try_files $uri =403;
    }
}

좋은 웹페이지 즐겨찾기