hostname

Hostname and Custom routing in Zend Framework don't work together for me

会有一股神秘感。 提交于 2019-12-11 03:52:51
问题 I am building an application that uses hostname routing to detect subdomains like user1.example.com user2.example.com and also have custom routes like user1.example.com/login This works well so far, however when I add custom routes they do not work. I have searched and read a lot but seems there is something I am missing. Here is what I have so far: //my routes in routes.ini [development] routes.login.type = "Zend_Controller_Router_Route" routes.login.route = "/login" routes.login.defaults

Amazon EC2 hostnames

落爺英雄遲暮 提交于 2019-12-11 02:28:14
问题 I am trying to configure WAS 8.5 on EC2, but what I find is that the EC2 hostname changes on each restart. So basically, I've created a WAS instance on ec2-54-200-56-168.us-west-2.compute.amazonaws.com, and then after restart the server (and IP of course) changes to ec2-54-200-55-7.us-west-2.compute.amazonaws.com Of course WAS needs the hostname in its cell configuration. But also, if the host names keep changing I don't understand how to set up two servers to talk to each other. 回答1: You can

process-local override of name resolution?

喜欢而已 提交于 2019-12-11 01:59:29
问题 I have test code that I want to have a couple of hostnames resolve to the loopback while testing. When deployed, this code will use the normal system name resolution as appropriate. Test and deployment host are recent linux distros (SLES11SP1, e.g.). I'd like to override hostname resolution for a single process, without being superuser. Is there a way to manipulate the nsswitch / hosts behavior in such a narrow fashion? Yes, of course I could override the hostnames themselves, but I prefer

Looking for regex/code for hostname/machine name validation

陌路散爱 提交于 2019-12-10 21:11:30
问题 Looking for hostname validation regex. Regular expression to match DNS hostname or IP Address? In that link gentlemen propose a decent regex. I have a few problems/questions with that: On windows computers/networks names like 1abcd are allowed (verified on our local network) In the proposed regex the dot might appear only once. I'd assume that abc.def.gh is a valid hostname as well, isn't it. Strange, but also couldn't find any .NET class that can validate hostname string (is it the situation

Is there a way to get a hostname from an IP address without depending on a DNS inquiry?

耗尽温柔 提交于 2019-12-10 18:29:39
问题 I'm trying to write a script that depends on knowing the names of the computers on a network segment, but all the scripts I've found depend on a DNS inquiry which only replys with the names of a few of the machines. For example: [System.Net.Dns]::GetHostbyAddress($IPAddress) I've also tried using Ping -a $ipaddress but this often fails to return the machine name as well. Is there a way to ask the host what it's name is directly and what level of permissions might be required in AD to get a

Java SSL: “fatal error: 80: … unwrapping net record” after adding the HTTPS EndpointIdentificationAlgorithm

a 夏天 提交于 2019-12-10 17:25:38
问题 Java 7u9 Error msg in title is: "fatal error: 80: problem unwrapping net record". SO wouldn't let me put "problem" in the title. I am building a Java HTTPS client against Netty. The SSL handshake was working until I added added the "HTTPS" endpoint identification algorithm to enable server hostname verification: SSLEngine engine = tcpHelper.getSSLContext().createSSLEngine(); SSLParameters sslParameters = engine.getSSLParameters(); sslParameters.setEndpointIdentificationAlgorithm("HTTPS");

InetAddress.getByName fails behind proxy

偶尔善良 提交于 2019-12-10 13:45:42
问题 I'm trying to resolve a host name to its' corresponding IP. My environment is a mac in a corporate network behind a proxy server, which is configured with a .pac file via the system preferences (automatic proxy configuration). So far everything is working fine and I can access resources inside and outside my corporate network. Resolving hosts within my network works perfectly fine: InetAddress.getByName("host.local"); But when I use external host names, I get a UnknownHostException:

Java - InetSocketAddress hostname with accents

浪尽此生 提交于 2019-12-10 13:07:49
问题 I encounter a problem establishing a connection with an server that has some accents (é è ô...) in its hostname. For example : String oUrl = "www.hôtel.fr"; System.out.println(oUrl); InetSocketAddress isa = new InetSocketAddress(oUrl.toString(), 80); System.out.println(isa.isUnresolved()); The ISA is never resolved. It works for www.google.fr. I tried to URLEncode the host (URLEncoder with UTF-8 charset, so hostname is www.h%C3%B4tel.fr) with no result. Does anybody have some clues ? I don't

HOST_NAME_MAX undefined after include <limits.h>

天大地大妈咪最大 提交于 2019-12-09 18:10:44
问题 I don't know why it still says HOST_NAME_MAX is implicit declaration. Instead, I searched the web and do the following to fix it: #include <netdb.h> and use MAXHOSTNAMELEN instead of HOST_NAME_MAX however, I am not very sure it this is a good way, and the reasons behind it. 回答1: Using grep : $ grep -rl '#define HOST_NAME_MAX' /usr/include We can see that HOST_NAME_MAX is defined in: /usr/include/bits/local_lim.h And local_lim.h is included by /usr/include/bits/posix1_lim.h : # grep -rl local

zsh prompt and hostname

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-09 16:01:16
问题 I use the following prompt in .zshrc: PROMPT="%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%1~ %{$reset_color%}%# " When I open terminal I see this prompt: zoltan@zoltan-Macbook-Pro ~ % Is it possible to drop the text "zoltan" in the hostname? I would like to make it look like this: zoltan@Macbook-Pro ~ % Any suggestion would be greatly appreciated. Thank you! 回答1: It's a bit of a mess, but you can pretend the %m is a parameter and use parameter expansion to strip the