码迷,mamicode.com
首页 > Web开发 > 详细

在用网站ICP备案主体变更导致网站无法访问问题解决

时间:2018-09-11 16:21:11      阅读:874      评论:0      收藏:0      [点我收藏+]

标签:返回   error_log   nts   referer   remote   internet   listen   iso   注销   

关于ICP备案:

备案的目的:是为了防止在网上从事非法的网站经营活动,打击不良互联网信息的传播,如果网站不备案的话,很有可能被查处以后关停。非经营性网站自主备案是不收任何手续费的,所以建议大家可以自行到备案官方网站去备案。

百度百科介绍:https://baike.baidu.com/item/ICP备案/1220667?fr=aladdin

关于网站ICP备案主体变更:

1、如您原公司和新公司都有自己的备案,那么您只能先将原备案信息注销后在用新单位进行备案(注销网站无法正常访问) 
2、如您原公司有备案,新公司没有备案过,您需要确保两个公司为同一省份,且当地管局规则允许从A单位变更为B单位才可以。(我们属于第二种)

 

变更备案的影响:变更是将原先的备案注销,重新提交新备案主体的审核,通过期间要求关闭网站。

如何规避备案期间关闭网站?

备案的主体是服务器,国内的服务器需要备案才能访问,香港地区的服务器不需要备案,所以备案期间我们将应用迁移到阿里云的香港服务器上。

 

实现过程:

 原理:我们采用nginx代理技术,用香港服务器代理真实服务器响应用户请求:

nginx反向代理:是指以代理服务器来接受Internet上的连接请求,然后将请求转发给内部网络上的服务器;并将从服务器上得到的结果返回给Internet上请求连接的客户端,此时代理服务器对外就表现为一个服务器。

 

1、采购阿里云香港服务器

配置:为了节约成本,根据网站访问量和程序占用的性能规划配置

ISO:CentOS release 6.8

2 vCPU 8 GB (I/O优化)

ecs.sn2ne.large  2Mbps 40g磁盘

 

2、nginx安装和配置:

# sbin/nginx -v
nginx version: nginx/1.14.0

 

#cat conf/nginx.conf
user nobody nobody; worker_processes
2; error_log /usr/local/nginx/logs/nginx_error.log crit; pid /usr/local/nginx/logs/nginx.pid; worker_rlimit_nofile 51200; events{ use epoll; worker_connections 6000; } http{ include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 3526; server_names_hash_max_size 4096; log_format combined_realip $remote_addr $http_x_forwarded_for [$time_local] $host "$request_uri" $status "$http_referer" "$http_user_agent"; sendfile on; tcp_nopush on; keepalive_timeout 30; client_header_timeout 3m; client_body_timeout 3m; send_timeout 3m; connection_pool_size 256; client_header_buffer_size 1k; large_client_header_buffers 8 4k; request_pool_size 4k; output_buffers 4 32k; postpone_output 1460; client_max_body_size 10m; client_body_buffer_size 256k; client_body_temp_path /usr/local/nginx/client_body_temp; proxy_temp_path /usr/local/nginx/proxy_temp; fastcgi_temp_path /usr/local/nginx/fastcgi_temp; fastcgi_intercept_errors on; tcp_nodelay on; gzip on; gzip_min_length 1k; gzip_buffers 4 8k; gzip_comp_level 5; gzip_http_version 1.1; gzip_types text/plain application/x-javascript text/css text/htm application/xml; include proxy.conf; //引入外部配置文件,真正的代理配置见这个文件 #server{ # listen 80; # server_name localhost; # index index.html index.htm index.php; # root /usr/local/nginx/html; # # location ~ \.php$ { # include fastcgi_params; # fastcgi_pass unix:/tmp/php-fcgi.sock; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name; # } }

 代理配置:

# cat proxy.conf 
server {
    listen 80;
    server_name *.xxx.com;               //访问域名80端口的请求全部转发到下面211.152.xxx.8:6666

location / {
    proxy_pass http://211.152.xx.8:6666;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header User-Agent $http_user_agent;
    }
}
server {
    listen 8888;
    server_name *.xxx.com;

location / {
    proxy_pass http://211.152.xxx.8:88;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header User-Agent $http_user_agent;
    }
}

3.进行域名解析

将域名解析至阿里云服务器

old: 211.152.xxx.8     xxx.com

new: 阿里云ip       xxx.com

 

 

4.其他配置及测试访问正常

我这边还将原先程序的80端口改为了6666,为了不被别人直接访问,其他结合自己的程序配置吧。

最后测试访问正常!

 

在用网站ICP备案主体变更导致网站无法访问问题解决

标签:返回   error_log   nts   referer   remote   internet   listen   iso   注销   

原文地址:https://www.cnblogs.com/-abm/p/9618904.html

(1)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!