localhost

Docker registry

二次信任 提交于 2019-12-07 12:53:24
公司自己的项目肯定少不了搭建私有的docker镜像管理平台,这里记录一下registry搭建过程。 一、简单搭建 1、docker 运行 registry mkdir -p /data/registry #创建文件夹docker run -d -p 5000:5000 -v /data/registry:/var/lib/registry --restart=always --name registry registry:2 2、上传 docker pull nginx #拉取nginx docker tag nginx localhost:5000/nginx:v1.0 #标记nginx docker push localhost:5000/nginx:v1.0 #发布到Registry中 3、查看Registry中的镜像 curl http://localhost:5000/v2/_catalog 4、拉取和使用 docker images #查询docker中所有镜像 docker rmi localhost:5000/nginx:v1.0 nginx #删除镜像 docker pull localhost:5000/nginx:v1.0 #拉取刚刚上传的镜像 docker run -d --name myNginx -p 8081:80 localhost:5000

What's the difference between using #form# and #getHttpRequestData()# with regard to charset?

随声附和 提交于 2019-12-07 12:35:18
问题 I have a coldfusion page, uni.cfm: <cfprocessingdirective pageencoding="utf-8"> <cfscript> <cfdump var="#form.a#" label="form"> <cfdump var="#getHttpRequestData().content#" label="form2"> Sending the following HTTP request produces in the returned html first the string "???" , then the string "a=ΠΣΩ" . POST http://localhost:8080/uni/unicode.cfm HTTP/1.1 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 User-Agent: unicli Host: localhost:8080 Content-Length: 8 Pragma: no-cache a

windows 使用openssl生成CA文件,tomact nginx 配置https及android https的ssl认证添加

为君一笑 提交于 2019-12-07 11:40:16
前言 该篇博文为工作总结,暂时记录的知识点有 :鄙人对https的拙见, windows 使用openssl 生成没有获取认证的证书(主要适用于平时练习)tomact 及nginx 对https的配合部分转发的配置,以及android请求后台添加ssl认证等小白知识点。本篇文章 大约需要耗时 20分钟。 1.https拙见 HTTPS相当于HTTP的安全版本,在HTTP的基础上添加SSL(Secure Socket Layer),SSL主要负责安全。 SSL 主要作用 1. 认证用户和服务器,确保数据发送到正确的客户机和服务器;(验证证书) 2. 加密数据以防止数据中途被窃取;(加密) 3. 维护数据的完整性,确保数据在传输过程中不被改变。(摘要算法) HTTPS流程 HTTPS在传输数据之前需要客户端(浏览器)与服务端(网站)之间进行一次握手,在握手过程中将确立双方加密传输数据的密码信息。 老大掏钱 我要数字证书(公司没钱,自己想办法。。。) 权威机构发放 数字证书 (本地使用openssl 生成证书) 服务端部署 数字证书 (本地配置在nginx 中) 客户端请求 服务端 生成一对非对称加密的密钥对,然后把公钥发给客户端 客户端 收到公钥,生成一个随机数,作为上图中那一把密钥,用刚才收到的公钥加密这个密钥 客户端 发给 服务器。(儿子接着 我的密钥) 服务端 收到加密后的密钥

nginx 简单使用指南

眉间皱痕 提交于 2019-12-07 11:40:02
前言 nginx 提供各种各样的服务器功能,本文记录 nginx 最基础的操作: 开启、停止、重载配置 静态文件服务器 反向代理 本文操作系统环境为 ubuntu18 安装 官方安装指导 开启、停止、重载配置 sudo nginx # 开启 sudo nginx -s stop # 快速停止 sudo nginx -s quit # 优雅停止 sudo nginx -s reload # 重载配置 停止 nginx 运行有两种方式,区别在于,“快速停止”会立刻停止 nginx;而 “优雅停止” 会等待已收到请求处理完毕再退出。也就是说,如果现在发出优雅停止命令,nginx 不会立刻停止运行,而是先看看,现在已收到的请求处理完没有,如果有的话,就会等待已收到的请求处理完再退出,当然这种情况下,如果有新的请求,是不会处理的。 重载配置是在 nginx 运行期间改变 nginx 的“行为”,nginx 的行为定义在配置文件里,修改配置文件并保存后,这些配置不会立刻生效,必须重启或者使用重载配置命令。 配置文件 想让 nginx 干什么事,要通过配置文件来说明,码者当前使用的 ubuntu18,配置文件在 /etc/nginx/nginx.conf 为了不使接下来的配置受老配置或者默认配置的影响,码者建议删除这个配置文件的所有内容,从零开始。(生产环境慎用) 静态文件服务器 怎么做

Can't access localhost with wamp and Chrome

依然范特西╮ 提交于 2019-12-07 11:02:48
问题 from today, when I go to localhost (http://localhost) after launch WAMP, in Firefox, as usual, everything is normal, but Chrome says "Forbidden, You don't have permission to access / on this server." Anyone can help me please ? 回答1: Edit: Solved it for me. This is an IPv6 problem. Google must have just updated Chrome. First of all ensure that your hosts file has the following line and that it is uncommented. ::1 localhost Next, open up your Apache config (httpd.conf) and add the following to

Spring-Cloud系列第6篇:spring-cloud-bus

蹲街弑〆低调 提交于 2019-12-07 10:51:31
自学spring-cloud系列,越来越感觉spring-cloud很强大! 主要分为以下几篇: spring-cloud-config: 分布式配置管理 spring-cloud-eureka: 服务注册与发现 spring-cloud-eureka-consumer: 远程服务调用和及其负载均衡 spring-cloud-Hystrix: 熔断器保证服务高可用 spring-cloud-config-eureka-ribbon: 分布式配置管理的高可用 spring-cloud-bus: 配置信息的实时更新 spring-cloud-zuul: 网关基础服务 介绍 在之前的Spring Cloud Config的介绍中,我们还留了一个悬念:如何实现对配置信息的实时更新。 通过/refresh接口和Git仓库的Web Hook来实现Git仓库中的内容修改触发应用程序的属性更新这是一个好的方法,但是我没讲,因为:若所有触发操作均需要我们手工去维护Web Hook中的应用位置的话,这随着系统的不断扩张,会变的越来越难以维护,而消息代理中间件是解决该问题最为合适的方案。是否还记得我们在介绍消息代理中的特点时有提到过这样一个功能:消息代理中间件可以将消息路由到一个或多个目的地。利用这个功能,我们就能完美的解决该问题,下面我们来说说Spring Cloud Bus中的具体实现方案。

Django Cannot Be Accessed From Localhost

徘徊边缘 提交于 2019-12-07 09:56:58
问题 It's kinda weird I cannot access django from localhost but I able to access it from local IP. python manage.py runserver 0.0.0.0:8000 then when I try to access from My host file 127.0.0.1 lmlicenses.wip4.adobe.com 127.0.0.1 lm.licenses.adobe.com 127.0.0.1 gc.kis.scr.kaspersky-labs.com ff.kis.scr.kaspersky-labs.com ie.kis.scr.kaspersky-labs.com 0.0.0.0 gc.kis.scr.kaspersky-labs.com ff.kis.scr.kaspersky-labs.com ie.kis.scr.kaspersky-labs.com I'm guessing something wrong with windows firewall or

Cannot run python Selenium script under localhost

你。 提交于 2019-12-07 08:28:26
I´m newbie to python and selenium. I´m creating app with GUI in web browser and the logic is executed in python under Apache. I have written some selenium scripts that work perfect when testing seperately outside Apache. But when I try to execute Selenium script under Apache on localhost, new Chrome or Firefox window won´t open. Apache with Python is confugured correctly --> able to run other python scripts. So here is my code: PYTHON !#path to python from selenium import webdriver import selenium.webdriver.chrome.service as service service = service.Service('C:\\wamp64\\www\\chromedriver.exe'

python selenium webdriver issue ( selenium.common.exceptions.WebDriverException: Message: "Can't load the profile. Profile Dir: )

有些话、适合烂在心里 提交于 2019-12-07 06:44:52
问题 I'm using Mac OS X 10.8.3, selenium 2.32.0, python 2.7, Firefox Version 20 and have been getting this error when running the python binding: selenium.common.exceptions.WebDriverException: Message: "Can't load the profile. Profile Dir: /var/folders/vn/8h6w79td4p59l9h9xhx2986r0000gn/T/tmpTmsdul Firefox output: LOG addons.xpi: startup LOG addons.xpi: Skipping unavailable install location app-system-share LOG addons.xpi: checkForChanges LOG addons.xpi: No changes found 2013-04-11 21:59:09.107

Eventmachine start_tcp_server no acceptor - port is in use or requires root privileges (RuntimeError)

痞子三分冷 提交于 2019-12-07 05:45:10
问题 I haven't been able to run my local server for 3 days now. Restarting my computer doesn't help. A couple of time, after trying repeatedly about 40-50 times, it randomly worked - I can't figure out why. I tried a different port once and that worked, but since then, no port works. Every time I try to run my rails server I get this. /Users/colmtuite/.rvm/gems/ruby-2.2.0/gems/eventmachine-1.0.5/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges)