码迷,mamicode.com
首页 > 其他好文 > 详细

lnmp vhost 文件

时间:2017-04-06 13:21:48      阅读:223      评论:0      收藏:0      [点我收藏+]

标签:ast   files   include   var   name   cat   ram   html   png   

server
{
listen 80 default_server;
#listen [::]:80 default_server ipv6only=on;
server_name blog.yangguangwei.xyz;
index index.php index.html index.htm;
root /home/wwwroot/default/blog;

#error_page 404 /404.html;
include enable-php.conf;

location /nginx_status
{
stub_status on;
access_log off;
}

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}

location ~ .*\.(js|css)?$
{
expires 12h;
}

location ~ /\.
{
deny all;
}

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

location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

access_log /home/wwwlogs/access.log;
}

 

lnmp vhost 文件

标签:ast   files   include   var   name   cat   ram   html   png   

原文地址:http://www.cnblogs.com/ygw1010/p/6672932.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!