Ecstore Linux服务器环境基本配置
Nginx基本配置(另存为nginx.conf直接可以使用):
#user nobody;
worker_processes 1; error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections 1024;
} http {
include mime.types;
default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; sendfile on;
#tcp_nopush on; #keepalive_timeout 0;
keepalive_timeout 65; #gzip on; server {
listen 80;
server_name localhost;
root e:/www; charset utf-8; access_log logs/host.access.log; location / {
root e:/www;
index index.html index.htm index.php;
autoindex on;
} #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 e:/www;
} # 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 {
include fastcgi_params;
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
} # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
}
网站根目录根据自己的情况修改;
文件中以下代码是为了配置nginx解析"pathinfo"函数
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") {
set $real_script_name $;
set $path_info $;
}
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
Ecstore Linux服务器环境基本配置的更多相关文章
- linux服务器应用NTP配置时间同步
linux服务器应用NTP配置时间同步 • 为什么建议使用ntpd而不是ntpdate? #####原因很简单,ntpd是步进式的逐渐调整时间,而ntpdate是断点更新,比如现在服务器时间是9.18 ...
- 免费开源的客服系统 Linux 服务器环境安装部署过程
最近因为项目需要,要找一款在线客服系统集成在 APP 中使用,而且涉及到生意开单,客服系统必须稳定可靠.另外甲方要求,必须支持 Linux 服务器环境. 我们以 Ubuntu 18.04 为例把安装部 ...
- 20145213《信息安全系统设计基础》实验一 Linux开发环境的配置
北京电子科技学院(BESTI) 实 验 报 告 课程:信息安全系统设计基础 班级:1452 姓名: 黄亚奇 祁玮 学号:20145213 20145222 成绩: 指导教师:娄嘉鹏 实验日期:2016 ...
- 信息安全系统设计基础实验一:Linux开发环境的配置和使用
北京电子科技学院(BESTI) 实验报告 课程:信息安全系统设计基础 班级:1353 姓名:芦畅 傅冬菁 学号:20135308 20135311 成绩: 指导教师:娄家鹏 ...
- linux服务器基本安全配置手册
转:忘了在哪转的,直接复制到笔记里了,贴出来分享 假如你想要搭建一个Linux服务器,并且希望可以长期维护的话,就需要考虑安全性能与速度等众多因素.一份正确的linux基本安全配置手册就显得格外重要. ...
- 拿到新linux服务器,从配置环境到跑起项目的部署流程
今早翻开手机看到某云一条广告Linux1 核 2 GB 1 Mbps服务器10元一个月,正巧最近在搞linux,于是下单了一台2个月20. 上班来到公司后,借空闲时间一顿研究,一波骚操作配置后,浏览器 ...
- Linux服务器的初步配置流程
作者: 阮一峰 日期: 2014年3月14日 开发网站的时候,常常需要自己配置Linux服务器. 本文记录配置Linux服务器的初步流程,也就是系统安装完成后,下一步要做的事情.这主要是我自己的总结和 ...
- linux服务器ntp客户端配置【转】
转自:https://www.cnblogs.com/kerrycode/archive/2015/08/20/4744804.html 在Linux系统中,为了避免主机时间因为在长时间运行下所导致的 ...
- Linux下环境变量配置方法梳理(.bash_profile和.bashrc的区别)
在linux系统下,如果下载并安装了应用程序,在启动时很有可能在键入它的名称时出现"command not found"的提示内容.如果每次都到安装目标文件夹内,找到可执行文件来进 ...
随机推荐
- python学习之内存机制
不可变对象(字符串.元组) 1. a = 1 首先在内存中创建对象1,并记录对象的引用计数为1次. id(a) 查看变量a引用的对象的内存地址 2. b = 1 内存中已存在对象1,变量b引用对象1, ...
- winform窗体 小程序【登录窗体】【恶搞程序】
登录窗体 using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; ...
- 【Java并发编程】5、java中ConcurrentLinkedQueue类
一.类结构: java.lang.Object java.util.AbstractCollection<E> java.util.AbstractQueue<E> java. ...
- spring 注解@PathVariable
@PostMapping(name="获取用户信息", value="/getUser/{userId}") public Object getUser(@Pa ...
- SqlSession对象之ResultSetHandler
ResultSetHandler是Mybatis中的另一重要接口,它的代码如下所示: public interface ResultSetHandler { <E> List<E&g ...
- NIO学习笔记六:channel 之前数据传输及scatter/gather
在Java NIO中,如果两个通道中有一个是FileChannel,那你可以直接将数据从一个channel传输到另外一个channel. FileChannel的transferFrom()方法可以将 ...
- javascript原型对象与原型链
在javascript中,当系统加载构造函授后 ,会自动在内存中增加一个对象,这个对象就是原型对象.构造函数和原型对象在内存中表现为相互独立,但两者之间还存在联系,构造函数的prototype是原型对 ...
- js-JavaScript实现数字的千位分隔符
function thousandSeparator(num) { return num && (num .toString().indexOf('.') != -1 ? num.to ...
- 排错-SP2-1503:无法初始化Oracle调用界面解决
SP2-1503:无法初始化Oracle调用界面解决 by:授客 QQ:1033553122 SP2-1503:无法初始化Oracle调用界面解决 问题描述: win7下,cmd运行输入sqlplus ...
- 完美实现Android的屏幕常亮功能
笔者所在公司做的APP是股票类的,用户在查看股票报价页面的时候,往往需要开启盯盘模式,这个时候屏幕是不能黑屏的,黑屏会导致用户看不到一些关键报价涨跌,错过了买入卖出的最佳时机,就会给用户造成损失,这是 ...