|
|
第1行: |
第1行: |
| | | |
− | = symbolic= | + | = pfSense= |
− | <pre>
| |
− | 有意思的
| |
− | include /etc/nginx/conf.d/*.conf;
| |
− | include /etc/nginx/sites-enabled/*;
| |
| | | |
| + | [https://pfschina.org/wp/?p=825 pfSense上的OpenVPN:启用对远程LAN资源的访问] |
| + | =ros Mikrotik= |
| + | [https://www.zhihu.com/question/21034719 如何评价极路由 HiWiFi] |
| | | |
| + | [https://www.jianshu.com/p/e38851f9de2f Mikrotik无线路由器快速设置教程] |
| | | |
| + | https://openwrt.org/zh/start |
| | | |
− | root@debian:/etc/nginx/sites-enabled# pwd
| + | [https://blog.netlab.360.com/7500-mikrotik-routers-are-forwarding-owners-traffic-to-the-attackers-how-is-yours/ 窃听风云: 你的MikroTik路由器正在被监听] |
− | /etc/nginx/sites-enabled
| |
− | root@debian:/etc/nginx/sites-enabled# file default
| |
− | default: symbolic link to /etc/nginx/sites-available/default
| |
| | | |
− | </pre>
| + | https://www.zhihu.com/topic/19653984/hot |
| | | |
− | =nginx conf=
| + | [https://zhuanlan.zhihu.com/p/101006349 树莓派软路由 OpenWrt 简介] |
− | ==80 443 共存==
| |
− | <pre>
| |
− | server
| |
− | {
| |
| | | |
− | listen 80;
| + | =路由器如何当交换机用= |
− | listen 443 ssl;
| + | 公司的无线非常的卡 ,于是把一个坏的无线路由拿过来当作交换机 ,这样 win debian 都可以用上有钱的 当然 自己带了两段网线 |
− | server_name www.iamle.com;
| |
− | index index.html index.htm index.php;
| |
− | root /home/wwwroot/www.iamle.com/;
| |
− | #ssl on; 这里要注释掉
| |
− | ssl_certificate /usr/local/nginx/conf/ssl/www_iamle_com.crt;
| |
− | ssl_certificate_key /usr/local/nginx/conf/ssl/www_iamle_com.key;
| |
| | | |
− | #以下配置省略 | + | # 关掉这个路由的DHCP功能 |
| + | #改掉LAN口IP地址 |
| + | #最网线不要接WAN接口 ,一个AP成功配置 |
| | | |
− | }
| + | [https://product.pconline.com.cn/itbk/wlbg/hiwifi/1702/8881901.html 路由器如何当交换机用] |
| | | |
− | </pre>
| + | [https://www.192ly.com/router-settings/mercury/mw325r-swsz.html 水星(MERCURY)MW325R路由器怎么设置] |
− | =sns 线上=
| |
− | <pre>
| |
− | cat www.cai.net.conf
| |
− | upstream proxy_node_nuxt.net {
| |
− | #fair;
| |
− | #ip_hash;
| |
− | #hash $clientRealIp;
| |
| | | |
− | #server 176.24.18.94:3333 weight=1 max_fails=2 fail_timeout=10s ;
| + | =双系统之win= |
| + | 2020年 08月 14日 星期五 15:37:29 CST |
| + | 如何删除双系统中的一个系统 |
| | | |
− | #old
| + | 场景 本本有两个 win7 一个在ssd ssd上的win7坏了 ,我重新安装win10 on ssd 但是又不见了 虽然第一启动是ssd |
− | #server 172.16.200.14:3333 weight=1 max_fails=2 fail_timeout=10s;
| |
− | }
| |
| | | |
− | server {
| + | 后来 在“运行”中我们输入“msconfig”然后点击“确定”,进入系统引导盘中 系统配置--》引导 把要的设置为默认 ,不要的也可以删除 然后就好了 开机是原来在ssd上的win7有点怪 不理了 |
− | listen 80;
| |
− | listen [::]:80;
| |
− | #listen 443 ssl http2;
| |
− | #listen [::]:443 ssl http2;
| |
− |
| |
− | server_name www.cai.net cai.net;
| |
| | | |
− | # return 301 https://www.cai.net$request_uri;
| + | =进入 bios= |
− | rewrite ^(.*)$ https://$host$1 permanent;
| + | ==asus== |
− | }
| + | 1、按电源键开机或重启,在启动过程中,不停按ESC键; |
| | | |
− | server {
| + | 2、调出Please Select Boot Device,这个是启动项选择界面,可以直接选择启动项,也可以从这边进BIOS,那就是按↓方向键,移动到Enter Setup这个项,然后按Enter键即可进入。 |
− | listen 443 ssl http2;
| |
− | listen [::]:443 ssl http2;
| |
− | # listen 443 ssl;
| |
− | server_name www.cai.net cai.net;
| |
| | | |
− | # if ( $host = 'www.cai.net' ) {
| + | http://www.xitongcheng.com/jiaocheng/xtazjc_article_44070.html |
− | # rewrite ^/(.*)$ https://www.cai.net/$1 permanent;
| |
− | # }
| |
− | if ( $host = 'cai.net' ) {
| |
− | rewrite ^/(.*)$ https://www.cai.net/$1 permanent;
| |
− | }
| |
− | root /data/www/www.cai.net;
| |
| | | |
| + | =缺少 api-ms-win-crt-runtime-l1-1-0.dll= |
| + | ==问题出现 == |
| | | |
− | index index.html index.htm;
| + | 运维组的其它小伙伴都请假了,于是我就暂时成为IT支持 |
| | | |
− | ssl_certificate /etc/nginx/ssl/cai.net.crt;
| + | “有个新来的同学电脑 出问题了 ” 前台妹子又出现了 |
− | ssl_certificate_key /etc/nginx/ssl/cai.net.key;
| |
| | | |
− | #by evan
| |
− | # if ($scheme = http) {
| |
− | # return 301 https://$server_name$request_uri;
| |
− | # }
| |
− | #by evan
| |
| | | |
− | location ~ /360_ssp_verify\.txt {
| + | 一同学安装画板驱动时出现如下 |
− | root /var/www;
| + | 错误:缺少 api-ms-win-crt-runtime-l1-1-0.dll |
− | }
| |
| | | |
− | location /nginx_status {
| |
− | stub_status on;
| |
− | access_log off;
| |
− | allow 183.6.50.25;
| |
− | allow 39.104.176.12;
| |
− | allow 45.114.170.162;
| |
− | allow 127.0.0.1;
| |
− | deny all;
| |
− | }
| |
| | | |
| + | 角斗办法 : |
| + | 自己选择相对应的版本下载 |
| + | https://support.microsoft.com/zh-cn/help/2999226/update-for-universal-c-runtime-in-windows |
| | | |
− | location /download/ {
| + | 其它小伙伴说的什么 重装 删除注册表并是是最佳 办法 |
− | root /var/www;
| |
− | }
| |
| | | |
− | location ^~ /.well-known/pki-validation/ {
| + | ==参考 == |
− | alias /var/www/pki-validation/;
| |
− | log_not_found off;
| |
− | }
| |
| | | |
− | merge_slashes off;
| + | https://helpx.adobe.com/cn/creative-cloud/kb/error_on_launch.html |
− | rewrite ^([^.]*?\/)\/+(.*)$ $1$2 permanent;
| |
| | | |
− | location / {
| + | [[category:ops]] |
− | proxy_pass http://proxy_node_nuxt.net;
| |
− | }
| |
− | ##evan
| |
− | | |
− | | |
− | # 去html
| |
− | rewrite ^/(.+)\.html /$1 last;
| |
− | # rewrite ^/info/$ /info/alerts/ last;
| |
− | | |
− | error_log /var/log/nginx/www.cai.net.error.log;
| |
− | access_log /var/log/nginx/www.cai.net.access.log;
| |
− | # include /etc/nginx/sites-available/blockips.conf;
| |
− | }
| |
− | | |
− | </pre>
| |
− | ==下载站==
| |
− | <pre>
| |
− | cat manage.88.com.conf
| |
− | server {
| |
− | listen 80;
| |
− | server_name manage.88.com;
| |
− | rewrite ^/(.*)$ https://manage.88.com:443/$1 permanent;
| |
− | access_log /data/wwwlogs/application-management_nginx.log combined;
| |
− | index index.php index.html;
| |
− | root /home/containers_data/nginx/wwwroot/application-management/public;
| |
− |
| |
− | #error_page 404 /404.html;
| |
− | #error_page 502 /502.html;
| |
− | #location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ {
| |
− | # valid_referers none blocked *.bidd.pro manage.88.com;
| |
− | # if ($invalid_referer) {
| |
− | # return 403;
| |
− | # }
| |
− | #}
| |
− | | |
− | location / {
| |
− | try_files $uri $uri/ /index.php$is_args$args;
| |
− | }
| |
− | | |
− | location ~ \.php$ {
| |
− | root /var/www/application-management/public;
| |
− | fastcgi_pass 127.0.0.1:9000;
| |
− | fastcgi_index index.php;
| |
− | include fastcgi_params;
| |
− | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
| |
− | }
| |
− | | |
− | location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
| |
− | expires 30d;
| |
− | access_log off;
| |
− | }
| |
− | location ~ .*\.(js|css)?$ {
| |
− | expires 7d;
| |
− | access_log off;
| |
− | }
| |
− | location ~ /\.ht {
| |
− | deny all;
| |
− | }
| |
− | }
| |
− | | |
− | server {
| |
− | listen 443 ssl;
| |
− | server_name manage.88.com;
| |
− | # ssl on;
| |
− | ssl_certificate /usr/local/nginx/conf/ssl/STAR.88.com.crt;
| |
− | ssl_certificate_key /usr/local/nginx/conf/ssl/STAR.88.com.key;
| |
− | # ssl_session_cache shared:SSL:1m;
| |
− | ssl_session_timeout 5m;
| |
− | ssl_ciphers HIGH:!aNULL:!MD5;
| |
− | ssl_prefer_server_ciphers on;
| |
− | # ssl_certificate /usr/local/nginx/conf/ssl/STAR.88.com.crt;
| |
− | # ssl_certificate_key /usr/local/nginx/conf/ssl/STAR.88.com.key;
| |
− | # ssl_session_timeout 5m;
| |
− | # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
| |
− | # ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
| |
− | # ssl_prefer_server_ciphers on;
| |
− | access_log /data/wwwlogs/application-management_nginx.log combined;
| |
− | index index.php index.html;
| |
− | root /home/containers_data/nginx/wwwroot/application-management/public;
| |
− | | |
− | #error_page 404 /404.html;
| |
− | #error_page 502 /502.html;
| |
− | #location ~ .*\.(wma|wmv|asf|mp3|mmf|zip|rar|jpg|gif|png|swf|flv|mp4)$ {
| |
− | # valid_referers none blocked *.bidd.pro manage.88.com;
| |
− | # if ($invalid_referer) {
| |
− | # return 403;
| |
− | # }
| |
− | #}
| |
− | | |
− | location / {
| |
− | try_files $uri $uri/ /index.php$is_args$args;
| |
− | }
| |
− | | |
− | location ~ \.php$ {
| |
− | root /var/www/application-management/public;
| |
− | fastcgi_pass 127.0.0.1:9000;
| |
− | fastcgi_index index.php;
| |
− | include fastcgi_params;
| |
− | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
| |
− | }
| |
− | | |
− | location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
| |
− | expires 30d;
| |
− | access_log off;
| |
− | }
| |
− | location ~ .*\.(js|css)?$ {
| |
− | expires 7d;
| |
− | access_log off;
| |
− | }
| |
− | location ~ /\.ht {
| |
− | deny all;
| |
− | }
| |
− | }
| |
− | | |
− | </pre>
| |
− | =troubleshooting=
| |
− | == 域名重复==
| |
− | <pre>
| |
− | f.d]# nginx -t
| |
− | nginx: [warn] conflicting server name "testbot.hailu.pro" on 0.0.0.0:88, ignored
| |
− | nginx: [warn] conflicting server name "testbot.hailu.pro" on 0.0.0.0:8443, ignored
| |
− | nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
| |
− | | |
− | | |
− | [root@10-8-2-235 conf.d]# head -n 5 hellotestzuulintra.conf
| |
− | server {
| |
− | listen 88;
| |
− | listen [::]:88;
| |
− | server_name testbot.hailu.pro;
| |
− | return 301 https://$server_name:8443$request_uri;
| |
− | [root@10-8-2-235 conf.d]# head -n 5 testbot.hailu.pro.conf
| |
− | server {
| |
− | listen 88;
| |
− | #listen [::]:88;
| |
− | server_name testbot.hailu.pro;
| |
− | return 301 https://$server_name:8443$request_uri;
| |
− | | |
− | </pre>
| |
− | | |
− | = ng js css img =
| |
− | <pre>
| |
− | css文件 浏览器打开为下载的处理 如下 ,不过其实好像不处理也没事的 只是不太好而已
| |
− | 静态资源文件去掉头
| |
− | content-type
| |
− | 还有expires
| |
− | wwwstatic.cai.com.conf
| |
− | cat wwwstatic.cai.com.conf
| |
− | #server {
| |
− | # listen 80;
| |
− | # server_name wwwstatic.cai.com;
| |
− | # rewrite ^(.*)$ https://$host$1 permanent;
| |
− | #}
| |
− | #
| |
− | server {
| |
− | listen 80;
| |
− | listen 443 ssl;
| |
− | server_name wwwstatic.cai.com;
| |
− | | |
− | #root /var/www/www.cai.com;
| |
− | index index.html index.htm;
| |
− | | |
− | ssl_certificate /etc/nginx/ssl/cai.crt;
| |
− | ssl_certificate_key /etc/nginx/ssl/cai.key;
| |
− | ssl_session_cache shared:SSL:1m;
| |
− | ssl_session_timeout 5m;
| |
− | ssl_ciphers HIGH:!aNULL:!MD5;
| |
− | ssl_prefer_server_ciphers on;
| |
− | | |
− | location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|js|css|svg|woff|ttf)$ {
| |
− | add_header 'Access-Control-Allow-Origin' '*';
| |
− | proxy_pass http://proxy_node_nuxt;
| |
− | # add_header Content-Disposition: 'attachment;';
| |
− | # expires 2d;
| |
− | }
| |
− | | |
− | location / {
| |
− | root /usr/share/nginx/html;
| |
− | if ($request_filename ~* ^.*?.(htm|html)$){
| |
− | add_header Content-Disposition attachment;
| |
− | }
| |
− | index index.html index.htm;
| |
− | }
| |
− | | |
− | location ~ /\.ht {
| |
− | deny all;
| |
− | }
| |
− | location /.well-known/acme-challenge/ {
| |
− | root /var/www/letsencrypt/;
| |
− | log_not_found off;
| |
− | }
| |
− | | |
− | location @router {
| |
− | rewrite ^.*$ /index.html last;
| |
− | }
| |
− | | |
− | error_log /var/log/nginx/wwwstatic.cai.com_error.log;
| |
− | access_log /var/log/nginx/wwwstatic.cai.com_access.log;
| |
− | # include /etc/nginx/sites-available/blockips.conf;
| |
− | }
| |
− | </pre>
| |
− | | |
− | =see alos=
| |
− | | |
− | [https://www.nginx.cn/install Nginx安装]
| |
− | | |
− | [https://juejin.im/post/5cdd4d3ee51d456e8240ddca |Nginx-安装与配置(1)]
| |
− | | |
− | | |
− | [https://blog.csdn.net/dengzhuineng7792/article/details/101243139?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.pc_relevant_is_cache&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.pc_relevant_is_cache http之Content-Disposition 属性]
| |
− | [[category:ops]]
| |