15AH, San Francisco

California, United States.

Send Your Mail At:

tianyingkejishe@sina.cn

Working Hours

Mon-Sat: 9.30am To 7.00pm

分类标题

Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et dolore feugait.

分类归档 web网页设计

修改wordpress文件上传大小限制

一、修改PHP文件上传大小限制

找到php的配置文件php.ini
我的配置文件所在位置为:/etc/php5/fpm/,请自行查找配置文件存放位置,可通过find命令快速查找存放位置

find / -name php.ini

修改相关配置
把下列参数修改后,在网络所允许的正常情况下,就可以上传大体积文件了
max_execution_time = 600 ;每个PHP页面运行的最大时间值(秒),默认30秒
max_input_time = 600 ;每个PHP页面接收数据所需的最大时间,默认60秒
memory_limit = 8m ;每个PHP页面所吃掉的最大内存,默认8M
file_uploads = on 是否允许通过HTTP上传文件的开关。默认为ON即是开
upload_tmp_dir = /tmp 临时上传目录
upload_max_filesize = 32m 最大上传文件大小
post_max_size = 32m 最大post数据限制
配置的好了后再使用终端
service php5-fpm restart 重启php服务
二、修改Nginx文件上传大小限制

添加client_max_body_size 20M, 必须要放在server下的server_name下,而不是放在localhost /web的大括号里

listen 80 default_server;
        listen [::]:80 default_server ipv6only=on;

        root /var/www;
        index index.html index.htm index.php;

        # Make site accessible from http://localhost/
        server_name localhost;
        client_max_body_size 20m;

        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
                # Uncomment to enable naxsi on this location
                # include /etc/nginx/naxsi.rules
        }

nginx -s reload

wordpress修改端口号不能访问

按照网上各种百度搜索,对于word press修改网址端口号后不能访问的问题都归宗于word press设置问题,但是都没有成功,后来一想不对啊,word press本身又不监听端口号,他怎么处理的呢,后来才想到nginx是对端口监听,简单修改后确实给.需要以下两点同时修改,才能生效。

Windows环境下使用Gitblit搭建Git服务器

一、安装Java环境

下载地址:www.java.com

根据网站提示直接下载,安装到成功。可以根据自己需求,修改安装路径,不再一一讲解。

二、安装Gitblit

1、下载地址:http://www.gitblit.com/

2、下载后,直接解压到你想要存放的位置,不需要安装。

3、修改配置文件,data/defaults.properties

打开defaults.properties分别搜索替换以下信息(参数说明):

server.httpPort = 8888    (http协议的端口 ,请改为自己的端口)
server.httpsPort = 8443  (https 协议的端口 ,请改为自己的端口)
server.httpBindInterface = localhost(建议不写,不然局域网无法访问)
server.httpsBindInterface = localhost(建议不写,不然局域网无法访问)
git.repositoriesFolder =d:/git (根据需要可以替换为自己指定的文件目录,注意反斜杠‘/’)

4、保存修改文件,启动服务

运行gitblit.cmd,出现以下画面说明服务启动成功

 

5、登录git服务管理网页

在浏览器中打开http://localhost:8443/,成功登陆Gitblit服务器。账号密码默认都是admin