添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

服务器开启2020端口

iptables 开放2020端口

-A INPUT -m state--state NEW -m tcp -p tcp --dport 2020 -j ACCEPT

重启iptables

service iptables restart 

我这里使用的是内置防火墙

开放2020

firewall-cmd --zone=public --add-port=2020/tcp --permanent

重启防火墙

systemctl restart firewalld

下面是我的2020端口https nginx配置全部代码

正常配置可以从::/etc/nginx/nginx.conf

下面是我的配置路径
路径:/etc/nginx/conf.d/admin.conf

server {
  #listen 	80; 
  listen 	2020 ssl;
  server_name www.我的网址.com;
  client_max_body_size 10M;
  ssl on;
  ssl_session_cache	shared:SSL:10m;
  ssl_session_timeout 10s;
  ssl_certificate /etc/nginx/conf.d/ssl/adminSSl.pem;
  ssl_certificate_key /etc/nginx/conf.d/ssl/adminSSl.key;
 # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 # ssl_ciphers  HIGH:!aNULL:!MD5;
 # error_page 497 301 https://$http_host$request_uri;
  access_log /logs/admin.log;
  index index.html;
  root /html/peixun/dist;
  charset utf-8;
  location / {
    try_files $uri $uri/ @router;
    index index.html index.htm;
  gzip on;
  gzip_min_length  1k;
  gzip_buffers     4 16k;
  gzip_comp_level 9;
  gzip_types text/plain application/x-javascript application/javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
  gzip_vary off;
  gzip_disable "MSIE [1-6]\.";
  error_page   405 =200 @405;
   location @405{
       root  /opt/htdocs;
  location @router {
    rewrite ^.*$ /index.html last;
  location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
    expires 30d;
    access_log on;

重启nginx

service nginx restart

去端口 增加

server {
    listen       80;
    server_name  vx.tianyuanzhuyi.cn;
    rewrite ^(.*) https://$host$1 permanent;

此时便可访问:
https://www.我的网址.com:2020 访问到网站了

如未能成功,请下方留言,留下你的联系方式。

阿里云安全组添加端口2020服务器开启2020端口iptables 开放2020端口-A INPUT -m state–state NEW -m tcp -p tcp --dport 2020 -j ACCEPT重启iptablesservice iptablesrestart我这里使用的是内置防火墙开放2020firewall-cmd --zone=public --add-p...
[转载]如何在443端口https 许多人肯定遇到过这个问题“服务器在国内,又没备案,但又想开网站,80和443又不能用,但又想开https" 今天我就给大家带来”如何在443端口https“ 首先和平常配置是一样的,我这里用的宝塔 创建网站,然后申请ssl证书(这里就不讲了) 然后点击站点的设置 点击”配置文件“(是站点的配置文件,不是nignx也不是php也不是sql的 然后你可以看到...
Nginx代理HTTPS443端口,Tomcat为HTTP的配置   开始觉得这个配置需求常的简单,不就是配置一下Nginx配置就搞定了。试了之后发现,出乎意料,所以打算将自己的经验记录下来。   简单的描述一下场景,Nginx监听端口:8443,开启SSL;Tomcat启动的监听端口:8080,是HTTP。然后需要从NginxHTTPS代理到Tomcat的HTTP,基本的请求的流程图如下...
开放系统防火墙的HTTP和HTTPS访问(可以不用加 sudo) #开放系统防火墙的HTTP和HTTPS访问 sudo firewall-cmd --add-service=http --permanent sudo firewall-cmd --add-service=https --permanent #防火墙添加外部可以访问的端口 sudo firewall-cmd --permanent --zone=public --add-port=8899/tcp sudo firewall-cmd --pe
nginx代理功能十分强大,经常用来做反向代理,但有的实际工作环境需要正向代理,经安装发现网上常用的方法有两点问题,1.并不支持https代理,2需要访问的网址一但加上80端口就会403报错。 后经反复测试,已找到解决以上两个问题方法,1安装ngx_http_proxy_connect_module 模块即可支持https代理。2安装lua-nginx-module模块用来解决80端口代理。 附件包含了全部安装过程,包括nginx.conf lua的配置,适合新手小白按步骤操作。 注意(附件中nua的版本我测试过nginx1.10.3可正常安装,nginx1.12.2报错不兼容。)
worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_loca
Nginx是一种高性能的Web服务器和反向代理,可以通过配置文件实现80端口转发。80端口转发需要在NGINX服务器上创建一个新的server块,用于监听该端口,并将请求转发到目标服务器。 首先,在nginx配置文件中添加以下代码段: server { listen 8080; #监听端口号 server_name example.com; #域名 location / { proxy_pass http://127.0.0.1:8081; #目标服务器和端口 proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; 以上代码段配置nginx监听8080端口,将请求转发到本地的8081端口。 其中,listen参数指定nginx监听的端口号,server_name参数指定该转发服务的域名。 在location /中,proxy_pass参数指定了需要转发的服务器地址(本例中为127.0.0.1的8081端口)。 proxy_set_header指令设置了对于代理请求的报头,用于告诉服务器转发请求的客户端的真实IP地址和主机名。 最后,保存nginx配置文件后重新加载配置,即可实现80端口转发。 需要注意的是,防火墙需要将nginx监听的端口开放。同时,需要确保目标服务器正常工作,并且提供对应端口的服务。
error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://v 12061 flutter:Warning! The 'flutter' tool you are currently running is from a different Flutter repository