localhost

HttpAddUrl on localhost fails for non-admin users

我只是一个虾纸丫 提交于 2020-01-01 18:34:45
问题 Using the Windows HTTP API I'm running a HTTP file server on localhost. This involves calling HttpAddUrl(hRequestQueue, L"http://localhost:80/", NULL) . This fails with ERROR_ACCESS_DENIED unless the user runs the application as administrator. I need this functionality for users who don't have admin privileges. (What's wrong with a user running a localhost server anyway? It's just for the user themselves.) I found a hotfix for Vista and XP which seems aimed at solving this, but there's

HttpAddUrl on localhost fails for non-admin users

ぐ巨炮叔叔 提交于 2020-01-01 18:32:09
问题 Using the Windows HTTP API I'm running a HTTP file server on localhost. This involves calling HttpAddUrl(hRequestQueue, L"http://localhost:80/", NULL) . This fails with ERROR_ACCESS_DENIED unless the user runs the application as administrator. I need this functionality for users who don't have admin privileges. (What's wrong with a user running a localhost server anyway? It's just for the user themselves.) I found a hotfix for Vista and XP which seems aimed at solving this, but there's

【Kafka】Kafka集群搭建

纵然是瞬间 提交于 2020-01-01 14:28:14
一、准备工作 服务器:最好是多台,大于等于2 已经搭建好的zookeeper集群 下载软件kafka_2.11-0.10.0.1.tgz 二、创建目录 #创建目录 cd /opt/ mkdir kafka #创建项目目录 cd kafka mkdir kafkalogs #创建kafka消息目录,主要存放kafka消息 #解压软件 tar -zxvf kafka_2.11-0.10.0.1.tgz 三、修改配置文件 进入到config目录 cd /opt/kafka/kafka_2.11-0.10.0.1/config/ 主要关注: server.properties 这个文件即可,我们可以发现在目录下: 有很多文件,这里可以发现有Zookeeper文件,我们可以根据Kafka内带的zk集群来启动,但是建议使用独立的zk集群。 connect-console-sink.properties log4j.properties connect-console-source.properties producer.properties connect-distributed.properties server.properties connect-file-sink.properties server1.properties connect-file-source.properties

解决微服务在docker上部署后无法连接数据库的问题

半世苍凉 提交于 2020-01-01 13:50:41
在利用docker部署完应用程序后,就接着考虑如何将程序连接到数据库。 但是过程中发现一些问题: 本地程序在打包后连接的是本地的数据库,在服务器上部署之后必须提供相同的环境才能部署成功。 这里我用的是宝塔安装的mysql,我尝试把用户名,数据库名,密码全部和自己的开发时的环境完全一致。 但是尝试多次之后,即便是修改的一模一样,在centos上运行还是报错。 这是当时连接数据库的url url : jdbc : mysql : / / localhost : 3306 / 数据库系统 ? useUnicode = true & useJDBCCompliantTimezoneShift = true & useLegacyDatetimeCode = false & serverTimezone = UTC 想了多次还是无法理解,甚至尝试过在docker上再创建一个mysql的容器,但是提示3306的端口被占用了。 就在无可奈何准备放弃的时候, 当时看了下mysql的一些视频(因为快考数据库了),讲到navicat也是可以连接远程数据库的,当时想了下,觉的比较有趣,尝试了下,成功了,顿时觉得数据库的连接有出路了。 解决办法 将localhost换成自己服务器的ip地址 ##前提是开放自己数据库的权限 也就是在开发时,连接的是自己服务器的数据库

ActiveMQ 传输协议

对着背影说爱祢 提交于 2020-01-01 13:24:39
配置 ActiveMQ安装目录的 conf/activemq.xml 中的 <transportConnectors> 标签之内。 配置示例 TCP(默认协议,性能相对可靠) Transmission Control Protocol(TCP) 这是默认的Broker配置,TCP的Client监听端口61616 在网络传输数据前,必须要序列化数据,消息是通过一个叫wire protocol的来序列化成字节流。默认情况下,ActiveMQ把wire protocol叫做OpenWire,它的目的是促使网络上的效率和数据快速交互。 TCP连接的URI形式如: tcp://localhost:port?key=value&key=value (后面的参数是可选) TCP传输的优点: TCP协议传输可靠性高,稳定性强 高效性:字节流方式传递,效率很高 有效性、可用性:应用广泛,支持任何平台 <transportConnectors> <transportConnector name="tcp" uri="tcp://localhost:61616?trace=true"/> </transportConnectors> NIO(基于TCP优化与扩展,扩展性高) New I/O API Protocol(NIO) NIO协议和TCP协议类似,但NIO更侧重于底层的访问操作

Subdomains and locally installed Rails app

淺唱寂寞╮ 提交于 2020-01-01 08:36:10
问题 I can't figure out what I'm overlooking, perhaps it's obvious or lack of understanding. The app I'm working with uses subdomains which on the hosting server work properly. I figured locally installing would kick up some issues around routing, so I read up on making changes to /etc/hosts and using the Ghost gem. Both seem to work fine i.e. localhost:3000/ becomes myapp.local:3000 but I don't understand how to go about logging into a subdomain account. Here's an example... myapp.local:3000

uninitialized constant ApplicationRecord

孤者浪人 提交于 2020-01-01 08:06:10
问题 I am working on the rails tutorial book online and I am getting the following error message when I go to http://localhost:3000/ "uninitialized constant ApplicationRecord" and it gives me the following code highlighting the first line. class User < ApplicationRecord attr_accessor :remember_token before_save { self.email = email.downcase } validates :name, presence: true, length: { maximum: 50 } VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i validates :email, presence: true, length: {

Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID

僤鯓⒐⒋嵵緔 提交于 2020-01-01 04:45:19
问题 I am facing strange issue on chrome while debugging local ASP.NET application on chrome. I am not able to open localhost without https . With Https it's giving error: Your connection is not private NET::ERR_CERT_COMMON_NAME_INVALID . It was working on chrome till last update & is working on firefox & IE. There is also no option in advanced setting to skip error & visit site. Please help. 回答1: Finally banging head on desk for two days I found this setting in chrome://flags/ to Allow invalid

怎样安装Joomla 1.7网站系统

妖精的绣舞 提交于 2020-01-01 04:24:31
如果你想使用Joomla(地球上最好的内容管理系统之一)搭建一个网站,大体的流程是,你需要先在本地电脑,也就是你的电脑或者笔记本上为Joomla搭建一个本地的运行环境,这样你的电脑就会变成一台服务器,在上面你就可以运行Joomla网站程序了,或者是其它类似的程序,比如Drupal,Wordpress,DiscuzX …然后我们可以全用FTP工具把在本地做好的Joomla网站上传到网站的空间里。 工具/原料 下载WAMP软件,用他来搭建Joomla网站本地的测试环境 下载中文版Joomla1.7网站系统,http://www.joomlagate.com/download/joomla-core/joomla17-core-chinese/ 步骤/方法 搭建网站运行环境,在电脑上分别去下载Apache,PHP,MySQL,然后要做一些复杂的配置才能让他们运行在一起,这里有个简单的方法,如果你用的是Windows系统,你可以下载WAMP,他可以快速的在你的电脑上搭建一个网站运行环境,或者你也可以选择XAMPP,他们都把网站环境所需的软件进行了整合,安装完成以后,全部搞定!并不需要多余的配置,非常简单。(如果你用MAC系统,可以下载MAMP) 使用WAMP或XAMPP搭建好环境以后你需要启动他们,然后打开浏览器。输入http://localhost ,如果你能看到环境默认的页面

Python操作MySQL数据库9个实用实例

北城余情 提交于 2020-01-01 03:18:46
用python连接mysql的时候,需要用的安装版本,源码版本容易有错误提示。下边是打包了32与64版本。 MySQL-python-1.2.3.win32-py2.7.exe MySQL-python-1.2.3.win-amd64-py2.7.exe 实例 1、取得 MYSQL 的版本 ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 # -*- coding: UTF-8 -*- #安装 MYSQL DB for python import MySQLdb as mdb con = None try : #连接 mysql 的方法: connect('ip','user','password','dbname') con = mdb.connect( 'localhost' , 'root' , 'root' , 'test' ); #所有的查询,都在连接 con 的一个模块 cursor 上面运行的 cur = con.cursor() #执行一个查询 cur.execute( "SELECT VERSION()" ) #取得上个查询的结果,是单个结果 data = cur.fetchone() print "Database version : %s " % data finally : if con: