Hot answers tagged

57

You can use the RedirectPermanent directive to redirect the client to your new URL. Just create a very simple VirtualHost for the old domain in which you redirect it to the new domain: <VirtualHost *:80> ServerName xy.example.com RedirectPermanent / http://abc.example.com/ # optionally add an AccessLog directive for # logging the ...


44

Chrome is interpreting the number 1168951531 as a decimal number, which when represented in hexadecimal is 45ACC8EB. 45ACC8EB in hex is the same as the dotted decimal 69.172.200.235, when you take each pair of hex digits as one decimal number. 45 -> 69 AC -> 172 C8 -> 200 EB -> 235 Short answer: It's the pure decimal representation of the same ...


19

Quoting Valentin V. Bartenev (who should get the full credit for this answer): A quote from documentation: If proxy_pass is specified with URI, when passing a request to the server, part of a normalized request URI matching the location is replaced by a URI specified in the directive If proxy_pass is specified without URI, a request URI ...


17

Well, 1.1.1.1 is an IP address. As far as who it is - it's public address space that bad internet citizens tend to use as a placeholder: inetnum: 1.1.1.0 - 1.1.1.255 netname: Debogon-prefix descr: APNIC Debogon Project descr: APNIC Pty Ltd country: AU admin-c: AR302-AP tech-c: AR302-AP mnt-by: ...


15

curl -I will generate a HEAD request. Adding the -L option will make it follow redirects. Timeouts can be controlled with several options depending on which bit of the request you want to time out. From the man page: --connect-timeout <seconds> Maximum time in seconds that you allow the connection to the server to take. This only limits ...


13

Found the answer after 4.5 hours of Googling! http://runtingsproper.blogspot.co.uk/2010/04/solved-breaking-parent-webconfig.html Basically taking advantage of <location path="." inheritInChildApplications="false"> <system.webServer> <!-- ... --> </system.webServer> </location>


13

I guess it's because people are so used to typing it in. You could do what twitter does and redirect www.example.com -> example.com, eventually it trains people not to put it in. The only technical reason I can think of is that you cannot have CNAMEs for root domains, thus if you're using a CDN to host your website then you usually have to have it going ...


12

Create or edit a .htaccess inside your DocumentRoot. Add RewriteEngine On RewriteRule ^(.*)$ http://abc.example.com/$1 [R=301,L] Additionally I would change the ServerName directive to the new domain and leave a ServerAlias with the old domain. ServerName abc.example.com ServerAlias xy.example.com


11

Try curl -v -L There are several tools, you can use from the command line, the most well known of which are curl and wget. With curl you can follow redirects using the flag -L; additionally, you want to see what happens on the way to the final URL so you need -v (verbose): curl -v -L www.domain.tld See here for details: http://curl.haxx.se/docs/faq.html ...


8

DNS doesn't know anything about ports. If you want to have tomcat listen on port 8080 then you have a couple of options. The first is to user the port number in the URL http://example.com:8080/ If you don't like to look of that then you can use your webserver as a port proxy e.g in Apache you can use mod_proxy <VirtualHost *:80> ServerName ...


8

Don't use mod_rewrite unless you have a reason to do so. Try this (put it in the <VirtualHost> block): ProxyPass /atom http://127.0.0.1:4000/atom ProxyPassReverse /atom http://127.0.0.1:4000/atom


8

I've found the solution: I added the following line above the "try_files" directive in the "location /"-block: rewrite ^([^.]*[^/])$ $1/ permanent; which does the magic.


8

I believe that this website may help you greatly: http://regex101.com/r/uP4nT1


8

I suspect that any performance increases you'll see are from improving whatever wrapper you're using to make your connections, rather than the overhead of launching curl for each URL. Whether it's curl or netcat or wget, you'll probably want to launch each one separately in order to process their results separately. But I'll answer this question in two ...


7

DNS is a hierarchy, with the topmost element at the far right. If you want a DNS entry for m.af.ia you would need to register af.ia. This is currently impossible: The .ia top-level domain does not exist according to the root zone database. You can petition ICANN for a new top-level domain, but I doubt you'll get it (and it would be hideously expensive...)


7

Let's break this example down briefly: http://www.serverfault.com/questions. http:// - the protocol used (HTTP in this case) www - the third level domain, sometimes used as a hostname. Also frequently called a subdomain. .serverfault - the second level domain, which is registered with a domain registrar .com - the top level domain . - the root domain. ...


7

Never rely on whether your app will be internal or external. Always develop as though the audience of the app will be outside your control (because it is). Go with ENV.APPNAME.DOMAIN.TLD With www. as the alias for "production".


7

The HTTP protocol allows the client application (usually a web browser) to create HTTP requests containing the name of the web site it wants to contact; this allows multiple web sites to coexist on the same IP address and port. All web servers can be configured to serve different contents based on the name of the web site the client is asking for; also, ...


7

Sounds like it could be a couple problems, DNS mainly However if you want a quick solution use your local hosts file. In you local hosts file: 192.168.10.111 MyMachine If you are running a DNS sever in the office you should look into the setting of your NIC and make sure you are pointed to it.


6

Even though the question was answered awhile ago, this is the rule that I used. <rule name="Redirect to HTTP on different port" enabled="true" stopProcessing="true"> <match url="(.*)"/> <conditions> <add input="{HTTPS}" pattern="ON"/> </conditions> <!-- Cannot Use {HTTP_HOST} as it contains ...


6

I recently ran into this problem, in a similar situation. But the answer from rjenkins would seem to cause problems with virtual applications that relied on inheritance of parent settings. If you know the name of the rewrite rule you can just do this: <rewrite> <rules> <remove name="RewriteNameToDisable" /> </rules> </...


6

I tested this with a simple bash script against a domain I have running behind an ELB: S='a'; URL='http://example.com/?foo='; while true; do echo $URL$S | wc -c; curl -I "$URL$S"; S=$S$S; done This worked fine for a while: 2081 HTTP/1.1 200 OK Content-Type: text/html; charset=utf-8 Date: Tue, 05 Feb 2013 15:01:44 GMT Server: Apache/2.2.22 (Ubuntu) ...


6

www.example.com is obviously a webserver mail.example.com is obviously an SMTP server dns.example.com is obviously a DNS server Sure, www.example.com can be shortened to example.com but speaking only for myself, I like things to be explicitly defined. Less confusion and easier to troubleshoot.


6

It's used to load balance. You can use DNS to point www.example.com to one IP, www2.example.com to another IP, www3.example.com to yet another IP and so on and so on. And, in fact, this is how it's used. If you look at the DNS records for the domain, you should see an entry for www pointing to one IP, www2 pointing to another IP, and so on. It's a simple ...


6

The error message says: Over the last 24 hours, Googlebot encountered 1 errors while attempting to retrieve DNS information for your site. The overall error rate for DNS queries for your site is 50.0%. This means that the problem probably lies with your DNS hosting. I ran it through DNSCheck and got this result. The relevant part is Name server ns2....


5

create a single frontend to 2 backends frontend webserver bind :80 option forwardfor acl bk_slow url_dir /slow_uri/ use_backend slow-pool if bk_slow default_backend default-pool backend default-pool balance ... option httpchk ... server ... backend slow-pool balance ... option ...


5

Yes you can, but only if your server admin allows you to change the Content-Disposition header. This can be allowed either on the server or website level but has to be allowed by the Administrator as it's configured via the applicationHost.confg file. Here's the rewrite rule for the web.config: <outboundRules> <rule name="Allow images to be ...


5

Two options: "NAT Reflection" is the term for getting your router to do the NAT for the outside address for traffic originating internally. How this is configured (or whether it can be) depends completely on your router. DNS view splitting. For this, you'd configure your DNS for internal systems to resolve the external name to the internal address, as ...


5

This actually has very little to do with AWS, so you can apply this more generally where you next have hosting. To solve this, you should setup DNS. At this point, you just add the corresponding entries: mybusiness.com. IN A 1.2.3.4 www.mybusiness.com. IN CNAME mybusiness.com so that (www.)mybusiness.com will work as expected. 1.2.3.4 is the (elastic) IP ...


5

You need to construct two regex's that are mutually exclusive: only one can be true at a time: How about if you make the second item be a regex like: ^/path[^/] The [^/] means "any character that is not /". Here are three URLs that are mutually exclusive: acl fb1 path_reg ^/path$ # Just /path acl fb2 path_reg ^/path/$ # Just /path/ acl ...


Only top voted, non community-wiki answers of a minimum length are eligible