apache不记录指定文件类型的日志
apache不记录指定文件类型的日志,如图片、css、js等。
修改网站配置文件
<FilesMatch ".(ico|gif|jpg|png|swf|css|js)">
SetEnv IMAG 1
</FilesMatch>
CustomLog logs/access_log combined env=!IMAG
apache不记录指定文件类型的日志,如图片、css、js等。
修改网站配置文件
<FilesMatch ".(ico|gif|jpg|png|swf|css|js)">
SetEnv IMAG 1
</FilesMatch>
CustomLog logs/access_log combined env=!IMAG
利用frp实现外网访问局域网系统,或进行微信开发等。frp项目地址:https://github.com/fatedier/frp
所需环境:
步骤
vmware 虚拟机(linux系统)设置中添加文件夹;
打开Linux终端,输入以下命令,需要在root用户下执行
(1)如果/mnt
下没有hgfs
文件夹,需要自己手动创建。输入:mkdir /mnt/hgfs
(2)输入vmhgfs-fuse .host:/ /mnt/hgfs
,共享文件挂载到hgfs目录下
(3)查看是否挂在成功ls mnt/hgfs
如服务器存在乱码文件,则可通过find命令来删除,如:
#找到文件节点
ls -i
1703907 ç¼?ç¨?ç? ç??é«?æ¸?pdfç??.pdf
#根据文件的node number删除
find ./ -inum 1703907 -exec rm {} \;
-exec选项find 搜索路径 [选项] 搜索内容 -exec 命令2 {} \;
1. [高危]
访问控制配置文件的权限设置 文件权限
描述
访问控制配置文件的权限设置
加固建议
运行以下4条命令:
chown root:root /etc/hosts.allow
chown root:root /etc/hosts.deny
chmod 644 /etc/hosts.deny
chmod 644 /etc/hosts.allow
同时添加:
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:443>
DocumentRoot "/www/hitortoise"
ServerName www.r1989.com
SSLEngine on
SSLCertificateFile /www/ssl/2_www.r1989.com.crt
SSLCertificateKeyFile /www/ssl/3_www.r1989.com.key
SSLCertificateChainFile /www/ssl/1_root_bundle.crt
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/www/hitortoise"
ServerName www.r1989.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.r1989.com$
RewriteRule ^/(.*)$ https://www.r1989.com/$1 [R=301,L]
</VirtualHost>
升级编译参数
./configure --prefix=/usr/local/php56 \
--with-config-file-path=/usr/local/php56/etc \
--with-bz2 \
--with-curl \
--enable-ftp \
--enable-sockets \
--disable-ipv6 \
--with-gd \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local \
--enable-gd-native-ttf \
--with-iconv-dir=/usr/local \
--enable-mbstring \
--enable-calendar \
--with-gettext \
--with-ldap \
--with-libxml-dir=/usr/local \
--with-zlib \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-mysql=mysqlnd \
--enable-dom \
--enable-xml \
--enable-fpm \
--enable-bcmath \
--enable-pcntl \
--with-mhash \
--enable-zip \
--with-openssl \
--enable-opcache \
--with-pear \
--with-apxs2=/usr/local/apache2/bin/apxs
nginx安装rtmp模块参考上篇文章内容:https://www.r1989.com/linux-1097.html
nginx通过rtmp模块提供rtmp服务, ffmpeg推送一个rtmp流到nginx, 客户端通过访问nginx来收看实时视频流。HLS也是差不多的原理,只是最终客户端是通过HTTP协议来访问的,但是ffmpeg推送流仍然是rtmp的。