吾心自足,心无外物,时时可死。步步求生,纵横四海,心无挂碍。
阅读全文
跨域的原因:浏览器的同源策略(是一种安全策略,用于隔离潜在恶意文件)
浏览器是从两个方面去做这个同源策略的,一是针对接口的请求,二是针对Dom的查询。如果没有同源策略,会出现以下的安全问题:
1
$ brew install glide
安装 virtualenv
pip install virtualenv
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
server { listen 80; server_name localhost; # charset koi8-r; # access_log /var/log/nginx/host.access.log main; location / { root /usr/share/nginx/html; try_files $uri /index.html; # index $uri $uri/ index.html index.htm; } # error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # # location ~ \.php$ { # proxy_pass http://127.0.0.1; # } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # # location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; # } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # # location ~ /\.ht { # deny all; # }}
配置nginx权限和静态文件统一(解决403问题)
vim /etc/nginx/nginx.conf
永久的开放需要的端口
12
$ sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent$ sudo firewall-cmd --reload
修改ssh配置文件,通常路径为/etc/ssh/ssh_config,添加如下内容:
12345678
Host 98 //这里是设置你的连接的一个别名 Hostname 111.111.111.111 //设置ip Port 56789 //设置端口号 User wangsan //设置登录名 PasswordAuthentication no //是否需要密码认证,如果是sshkey认证,则no ForwardAgent yes //是否需要转发key到代理服务器,如果需要通过跳转机连接同学,这里需要填写yes AddKeysToAgent yes //将key添加到sshkey转发列表 IdentityFile ~/.ssh/98/id_rsa //这里是你生成的私钥地址,对应的公钥也需要放入id_rsa.pub