如何禁止IP地址的方式访问网址
回 1楼梦丫头的帖子
版主,我现在已经绑定域名了,我是想禁止ip访问的方式访问网址,如何做呢?谢谢版主
-------------------------
回 3楼51干警网的帖子
干警哥,您好!我直接把
server 和大括号里面的内容直接复制到最下面可以吗?如下面红色字体,还有就是
server_name
后面用写上我的域名吗?如果需要,那域名前面是否需要加www. 。谢谢您!
user www www;
worker_processes 1;
error_log /alidata/log/nginx/error.log crit;
pid /alidata/server/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 65535;
events
{
use epoll;
worker_connections 65535;
}
http {
include mime.types;
default_type application/octet-stream;
#charset gb2312;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 8m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 128k;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
#limit_zone crawler $binary_remote_addr 10m;
log_format '$remote_addr - $remote_user [$time_local] '$request' '
'$status $body_bytes_sent '$http_referer' '
''$http_user_agent' '$http_x_forwarded_for'';
include /alidata/server/nginx/conf/vhosts/*.conf;
}
server {
listen 80 default;
server_name _;
server_name 需要绑定的域名;
return 500;
}
-------------------------
Re如何禁止IP地址的方式访问网址
自己给自己顶一个
-------------------------
Re如何禁止IP地址的方式访问网址
有人回答吗 ?谁回答谁是高手!
-------------------------
Re如何禁止IP地址的方式访问网址
阿里云你的服务怎么这么差,给你差评,论坛不回复,工单提到论坛,工单提到 收费 服务,你是一坨 si 吗????
赞0
踩0