nginx.conf server节点一般设置
来源:互联网 发布:淘宝手机兼职 编辑:程序博客网 时间:2024/06/07 10:02
server {
listen 80;
#server_name 39.108.108.155;
server_name www.hutu.cn;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /website/www/hutu;
index index.php index.html index.htm;
if (!-e $request_filename){ #方式1
rewrite ^/(.*) /index.php last;
}
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
location ~ \.php$ {
root /website/www/61wx;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ .*\.(js|css|gif|jpg|jpeg|png|bmp|swf|mp3|mp4|ttf|woff|svg|eot|txt|html|htm)$
{
root /website/www/61wx;
if (-f $request_filename) {
expires 1d;
break;
}
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
listen 80;
#server_name 39.108.108.155;
server_name www.hutu.cn;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /website/www/hutu;
index index.php index.html index.htm;
if (!-e $request_filename){ #方式1
rewrite ^/(.*) /index.php last;
}
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
location ~ \.php$ {
root /website/www/61wx;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ .*\.(js|css|gif|jpg|jpeg|png|bmp|swf|mp3|mp4|ttf|woff|svg|eot|txt|html|htm)$
{
root /website/www/61wx;
if (-f $request_filename) {
expires 1d;
break;
}
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
阅读全文
0 0
- nginx.conf server节点一般设置
- nginx.conf一般配置说明
- nginx.conf设置
- <nginx.conf> nginx设置用户权限
- nginx.conf设置了什么
- nginx的配置设置 nginx.conf
- Nginx配置配置文件nginx.conf的设置
- nginx配置文件nginx.conf conf.d(一般都放这个目录下)
- nginx.conf配置文件解析(http、server、location)
- nginx: [emerg] "server" directive is not allowed here in /usr/local/nginx/conf/nginx.conf:45
- nginx.conf
- nginx conf
- nginx.conf
- nginx.conf
- nginx.conf
- Nginx Conf
- nginx.conf
- nginx.conf
- 51nod1200 石子游戏 V2
- Android Studio 常用调试技巧
- 【LeetCode 300 Longest Increasing Subsequence】最长递增子序列
- 我的Mac键盘失灵了(u,i,o,j,k,l,k,m无效了)-- Mac鼠标键的开启和关闭
- 自定义cell默认初始化方法
- nginx.conf server节点一般设置
- SetRegistryKey的作用
- easyui简单使用记录
- Android-Universal-Image-Loader源码解析
- 【Linux】挂载和卸载ISO镜像文件
- python爬虫之爬取捧腹网段子
- Ubuntu系统下如何提交代码到github
- 51nod1247 可能的路径
- Learning Multi-Domain Convolutional Neural Networks for Visual Tracking CVPR 2016 阅读笔记