原创 解決nginx 出現 413 Request Entity Too Large的問題 原

php.ini 文件已經設置了附件大小和表單提交大小爲128M upload_max_filesize = 128M post_max_size = 128M 然而nginx還是報  413 Request Entity Too Lar

原创 ubuntu16.04 LNMP環境搭建以及卸載 頂 原

下載nginx 1.10.3 apt-get install nginx 下載mysql-server  5.7.23 apt-get install mysql-server 下載php  7.0.30 apt-get install p

原创 ubuntu LNMP nginx 隱藏index.php 配置文件 原

創建/編輯配置文件 #(自己設置虛擬主機的配置文件) vi /etc/nginx/site-available/www.myredis.local.com server { listen 80; root /var/www/

原创 Laravel5.5 配置多模塊 原

安裝依賴 cd /var/www/html/blog composer require caffeinated/modules 編輯配置文件config/app.php,註冊服務器提供者和門面 # 在 providers 配置項中添加註

原创 ubuntu16.04 安裝 操作 redis 原

安裝redis apt-get installl redis-server 安裝php-redis apt-get installl php-redis 檢查redis進程 ps -aux|grep redis 通過命令行訪問redis 

原创 網站設置X-Frame-Options 響應頭 原

Apache 編輯目標配置文件  xxx.conf 添加  Header always append X-Frame-Options SAMEORIGIN 保存。 執行命令開啓header模塊(已開啓忽略) a2enmod headers

原创 ubuntu 自定義記錄用戶登錄以及操作日誌 原

root@ms:~# cd /etc #更改之前先備份,養成良好的習慣,否則腸子都要悔青了 root@ms:/etc# cp profile profile.bak root@ms:/etc# vi profile 在文章末尾加入

原创 mysql 開啓日誌記錄並且解決日誌時間錯誤問題 原

注:(1)mysql版本5.7  ubuntu16.04        (2)爲了簡明的查詢日誌,我在系統默認mysql日誌文件夾中對日誌進行了分類,並把賦予正確的權限 root@localhostserver:/var/log/mysql

原创 ubuntu16.04 配置nginx支持redis 原

# 下載git 以及PHP擴展 apt-get install git php-dev # 下載phpredis git clone https://github.com/nicolasff/phpredis.git #

原创 git clone 報錯 Clone failed: Authentication failed for 原

新裝了系統,git和phpstorm的配置全都沒有了,重新安裝了git和phpstorm 系統:windows10 代碼託管平臺:阿里雲code 軟件的安裝不作贅述。 報錯1 Could not read from remote repos

原创 lnmp 的swoole安裝以及部分問題解決 原

服務器環境:ubuntu+nginx+php7.0 1.安裝nghttp2庫: sudo apt-get install nghttp2  或者 sudo wget https://github.com/nghttp2/nghttp2/re

原创 ubuntu16.04 配置 nginx 簡單負載均衡 原

主機:192.168.0.118 負載機1:192.168.0.117 負載機2:192.168.0.105   第一步:編輯主機hosts文件,配置域名 vi /etc/hosts 127.0.0.1     www.nginx.loc

原创 ubuntu設置系統時間與網絡時間同步 原

dpkg-reconfigure tzdata 選擇 Asia 選擇 Shanghai或Chongqing date -s 按照提示進行選擇時區, 然後防止系統重啓後時區改變 sudo cp /usr/share/zoneinfo/Asia

原创 ubuntu16.04 實現mysql 主從複製讀寫分離 原

編輯mysql配置文件 vi  /etc/mysql/mysql.cof.d/mysql.cnf #服務器唯一標識 server-id               = 1 #啓動MySQL二進制日誌 log_bin            

原创 ubuntu16.04安裝php5.6 原

有一個項目很老了,最開始用的php版本是5.3,現在換服務器,服務器是ubuntu16.04,默認的php版本是7.0,然後項目在這個版本上運行不起來。 於是,就卸載了7.0,裝一個5.6吧。 apt-get install -y lang