;

步骤一: crontab -e crontab -l查看 步骤二: #每分钟执行一次 */1 * * * * /usr/bin/php5 /var/www/site/inde.php #每小时执行一次 0 * * * * /usr/bin/php5 /var/www/site/inde.php #每天执行一次 0 0 * * * /usr/bin/php5 /var/www/site/inde.php #每周执行一次 0 0 * * 0 /usr/bin/php5 /var/www/site/inde.php #每月执行一次 0 0 1 * * /usr/bin/php5 /var/www/site/inde.php #每年执行一次 0 0 1 1 * /usr/bin/php5 /var/www/site/inde.php 步骤三:退出保存 点击键盘上的Esc键,输入“:wq”回车 # +—————- minute (0 – 59) # | +————- hour (0 – 23) # | | +———- day of month (1 – 31) # | | | +——- month (1 – 12) # | | | | +—- day of week (0 – 6) (Sund…

crontab定时任务 2017年6月30日
;

步骤一:找到  /etc/apache2/apache2.conf 步骤二:查找 ‘ErrorLog’  默认为 ‘ErrorLog ${APACHE_LOG_DIR}/error.log’ 步骤三:打开同目录下 /etc/apache2/envvars 文件 查找 APACHE_LOG_DIR 结果即是 默认结果为  /var/log/apache2

apache 日志位置 2016年12月2日
;

路径:/etc/apache2/ports.conf 查找 Listen 80 加入 Listen 8001 重启服务器

apache 配置 端口 2016年10月11日
;

步骤1:检测是否开启 if (in_array(‘mod_rewrite’,apache_get_modules())) { echo ‘恭喜,你的空间支持rewrite.’; } else { echo ‘很抱谦,你的空间不支持rewrite.’; } 步骤2:执行命令 sudo a2enmod rewrite 步骤3:找到 apache2.conf <Directory /var/www/> Options FollowSymLinks AllowOverride None Require all granted </Directory> 修改为: AllowOverride All 步骤:4:重启服务器 sudo service apache2 restart

apache2 开启 rewrite 2016年7月15日
;

链接 步骤1: 网站web根目录下创建对应错误页面: custom_404.html custom_404.html custom_50x.html custom_50x.html custom_50x.html 步骤2: 文件路径:/etc/apache2/sites-available/willless.com.conf 步骤3: 添加内容: ErrorDocument 404 /custom_404.html ErrorDocument 500 /custom_404.html ErrorDocument 502 /custom_50x.html ErrorDocument 503 /custom_50x.html ErrorDocument 504 /custom_50x.html <Files "custom_404.html"> <If "-z %{ENV:REDIRECT_STATUS}"> RedirectMatch 404 ^/custom_404.html$ </If> </Files> <Files "custom_50x.html"> <If "-z %{ENV:REDIRECT_ST…

apache2 设置404页面 2016年6月23日
;

rm -rf 删除目录 mkdir 创建目录 ls -lh 文件列表 ln 软链接 cp 复制 mv 移动,改名 cat 显示文件内容 more 显示文件,一页一页翻动 man rar 获取rar命令帮助 unrar –help 两条横线 rar a abc.rar abc 压缩 unrar e update.rar 解压到当前目录 unrar x update.rar update 解压到指定目录 全体修改: chmod -R 755 willless/ 修改文件权限: find willless/ -type f -exec chmod 644 {} \; 修改文件夹权限: find willless/ -type d -exec chmod 755 {} \; top 查看负载

ubantu 命令 2016年6月20日
;

步骤1: 目录位置:/etc/apache2/sites-available 步骤2: 新建文件:willless.com.conf 步骤3: <VirtualHost *:80> ServerName willless.com ServerAlias www.willless.com ServerAdmin webmaster@localhost DocumentRoot /var/www/willless ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> 此时配置文件还不能生效需要下面的步骤 步骤4: 访问授权: 打开Xshell命令行 输入: sudo a2ensite willless.com.conf 步骤5: 重启web服务器 sudo service apache2 restart 步骤6: 大功告成

apache 2 虚拟主机 配置(ubantu) 2016年6月17日
;

文件路径:/etc/apache2/apache2.conf indexes Options Indexes FollowSymLinks AllowOverride None Require all denied 删掉Indexes 改为 Options FollowSymLinks AllowOverride None Require all granted 重启服务器 更新环境为ubuntu20后采用如下 Options FollowSymLinks AllowOverride All Require all granted

ubantu apach2 禁止网站目录浏览 2016年6月12日