Nginx 普通配置
server {
listen 80;
server_name zabbix.ekzc.com;
access_log /data/wwwlogs/zabbix.akiraka.com_nginx.log combined;
index index.html index.htm index.php;
root /data/wwwroot/zabbix.ekzc.com;
include /usr/local/nginx/conf/rewrite/none.conf;
#error_page 404 /404.html;
#error_page 502 /502.html;
location ~ [^/]\.php(/|$) {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
expires 30d;
access_log off;
}
location ~ .*\.(js|css)?$ {
expires 7d;
access_log off;
}
location ~ /\.ht {
deny all;
}
}
版权声明:
作者:Akiraka
链接:https://www.akiraka.net/linux/nginx/135.html
来源:Akiraka
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
海报
Nginx 普通配置
server {
listen 80;
server_name zabbix.ekzc.com;
access_log /data/wwwlogs/zabbix.akiraka.com_nginx.log combined;
index index.html index.htm ……
文章目录
关闭