CDN启用防盗链 通过搜索引擎访问站点服务器返回403
今天有人反馈我的站点,通过360搜索、百度搜索均出现无法访问,服务器都返回HTTP状态“403 Forbidden”,浏览器提示“You don’t have permission to access the URL on this server.” 但是通过浏览器打开显示正常。下面分享一下我的解决方法! ...
今天有人反馈我的站点,通过360搜索、百度搜索均出现无法访问,服务器都返回HTTP状态“403 Forbidden”,浏览器提示“You don’t have permission to access the URL on this server.” 但是通过浏览器打开显示正常。下面分享一下我的解决方法! ...
今天新安装的宝塔面板,想编译云锁模块。怎么也编译不上,提示这个。原来是pcra在做怪。修改到pcre安装目录就可以了。问题完美解决。记录一下 报错信息如下: 1make -f objs/Makefile 2make[1]: Entering directory `/work/tengine-2.3.2' 3cd /pcre-8.43 \ 4&& if [ -f Makefile ]; then make distclean; fi \ 5&& CC="cc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \ 6./configure --disable-shared 7/bin/sh: line 0: cd: /pcre-8.43: No such file or directory 8make[1]: *** [/pcre-8.43/Makefile] Error 1 9make[1]: Leaving directory `/work/tengine-2.3.2' 10make: *** [build] Error 2 编译信息参数: 1./configure --user=www --group=www --prefix=/www/server/nginx --add-module=/www/server/nginx/src/ngx_devel_kit --add-module=/www/server/nginx/src/lua_nginx_module --add-module=/www/server/nginx/src/ngx_cache_purge --add-module=/www/server/nginx/src/nginx-sticky-module --with-openssl=/www/server/nginx/src/openssl --with-pcre=/pcre-8.43 --with-http_v2_module --with-stream --with-stream_ssl_module --with-http_stub_status_module --with-http_ssl_module --with-http_image_filter_module --with-http_gzip_static_module --with-http_gunzip_module --with-ipv6 --with-http_sub_module --with-http_flv_module --with-http_addition_module --with-http_realip_module --with-http_mp4_module --with-ld-opt=-Wl,-E --with-cc-opt=-Wno-error --with-ld-opt=-ljemalloc --add-module=/work/nginx-plugin-master 这里看报错信息发现一个参数是pcre的地址,由错误 cd: /pcre-8.43: No such file or directory 可以看出来是,应该是没有找到pcre-8.43的路径,看一下磁盘根目录,没有发现pcre安装的目录,凭我感觉,宝塔nginx已经安装了,应该存在pcre-8.43目录。于是我在宝塔的安装目录下找到了。 ...
Apache/kangle (.htaccess) 这里带着自动转跳到https,如果不需要可以删除。 1<IfModule mod_rewrite.c> 2RewriteEngine On 3RewriteBase / 4RewriteCond %{REQUEST_FILENAME} !-f 5RewriteCond %{REQUEST_FILENAME} !-d 6RewriteRule ^(.*)$ /index.php/$1 [L] 7RewriteCond %{SERVER_PORT} !^443$ 8RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] 9</IfModule> 如果不是开启SSL访问,请删除以下代码 1RewriteCond %{SERVER_PORT} !^443$ 2RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R] 如果不带www访问到带www站点 ...
##操作步骤: 1、配置编译环境:(如果已经存在,可以略过) 1yum install -y gcc gcc-c++ pcre-devel openssl openssl-devel 2、建立工作目录/work,下载并解压云锁Nginx防护模块:(记住防护模块解压后的目录/data/nginx-plugin-master) ...