KWeb Posted October 23, 2009 Report Share Posted October 23, 2009 Here is my problem I am trying to setup some virtual hosting for a couple of development sites. I had to contact my dns host and my host to allow wildcards. They said they would have to change my IP to do this (not sure why) but they changed my IP address and they added new wildcards to the DNS records (site1. and site2. etc.) I had virtual hosts setup and working with my main domains before the move to a new IP. After they moved the IP, nothing worked. I looked at my Apache access log files and I didn't see any activity on port 80, which makes me think that possibly something is wrong in the firewall or in the dns records. Or possibly the new IP address just isn't directed to the right server. My hosts swears everything is correct and says since we are getting 404 errors the request is making it all the way to the server. So, if the requests are making its way to the server, why don't I see this in the access files? Is there some other reason that Apache wouldn't be seeing these requests on Port 80? Like I said, before the move the server was functional and working great for years. I had my hosts change everything back and wala it works again. Is there something else I need to change in the configuration to allow requests from a different IP? I have the NameVirtualHost * so it should accept all IP addresses, right? Any help would be appreciated. Quote Link to comment Share on other sites More sharing options...
Ric Posted October 23, 2009 Report Share Posted October 23, 2009 “I have the NameVirtualHost * so it should accept all IP addresses, right?”Yes that’s correct and the whole point of named based hosts. “My hosts swears everything is correct and says since we are getting 404 errors the request is making it all the way to the server.”I agree because a 404 error is an automatic response by your server that it cannot find the requested resource. I do not understand this:“They said they would have to change my IP to do this (not sure why) but they changed my IP address and they added new wildcards to the DNS records (site1. and site2. etc.) “ All that is required is to add the following to the end of a dns record:*.example.com. IN A 999.8888.777.6666 Where 999.8888.777.6666 is your fixed IP address and * is the wildcard which means a user can type something like this into a browser: fred.example.comwww.fred.example.comsome.other.name.example.comanother.example.com Note: example.com is the domain name and resolves to IP address 999.8888.777.6666Note: some.other.name is a sub-domain of example.com a sub-domain can be any name you choose. Once a domain name is resolved the entire name is sent to that IP address. Where Apache resolves the appropriate sub-domain in a Vhost section. Note: You can have different domains for exampleuniformserver.com with IP address 999.8888.777.6666If wild cards have been enabled it can have sub-domains for examplewiki.uniformserver.comforum.uniformserver.com Again they end up at the same server IP (999.8888.777.6666) where Apache resolves the appropriate sub-domain and domains in a separate Vhost section Using the above examples Apache contains the following Vhost sectionsexample.comfred.example.comwww.fred.example.comsome.other.name.example.comanother.example.comuniformserver.comwiki.uniformserver.comforum.uniformserver.com If Apache cannot resolve a name it will use the first Vhost listed and attempt to serve the resource from there. Getting 404 errors:If a user types http://www.fred.example.comApache assumes an index page (index.html, index.htm, index.php …) is being requested. If an index.page does not exist a 404 error is returned. Likewise its true for any requested page that does not exist. “After they moved the IP, nothing worked.”Wrong you get 404 errors. First thing to try is to bypass your DNS server.Goto http://www.whatsmyip.org/ and pick up the IP address displayed for example 84.222.111.102 Type that into a browser as follows http://84.222.111.102Your browser will display the index page from the default Vhost If it fails check the Vhost section. It should look similar to this: ServerName example.com DocumentRoot C:/test/UniServer/www/z_example If that works try the real domain name for the first Vhoste.g. http://example.com If that fails it could be a DNS server issue “Like I said, before the move the server was functional and working great for years. I had my hosts change everything back and wala it works again.”Try the above basic IP test. ”Is there something else I need to change in the configuration to allow requests from a different IP? “ Both the DNS server and your assigned IP (from your ISP) must match. Well the above are a few pointers. All the bestRic Quote Link to comment Share on other sites More sharing options...
KWeb Posted October 23, 2009 Author Report Share Posted October 23, 2009 Ric, Thanks for taking the time to respond. That is all really helpful. I have tried to do the IP test and I get 404 errors. But when I look at the access logs it isn't logging any requests. I am wondering if possibly the host setup the wrong mapping in the firewall so it isn't hitting my server but someone else's server that is behind the same firewall. Is there anyway to check this? here is my httpd.conf file NameVirtualHost * <VirtualHost *>ServerName site1.exampleurl.comDocumentRoot c:/UniServerX.X/www/theme1</VirtualHost> Any other hints or ideas would be really appreciated. Thanks again Quote Link to comment Share on other sites More sharing options...
Ric Posted October 23, 2009 Report Share Posted October 23, 2009 Ok your host file looks fine.You may well be right regarding the IP test is picking up another server. I never ask which version of Uniform Server you are using if its not 5.3-Nano.Download Uniform Server 5.3-Nano close your current server and run 5.3-Nano.From UniTray click on Server status, at the top of the pop-up you will see: Your Internet IP Address = 88.999.999.102Accessible from Internet = YESCron run status = Not runningPHP INI: php.ini file = Production The IP address is that as seen from the Internet.This IP address is used in another test to confirm your server can be accessed from the Internet. If “Accessible from Internet = NO” This confirms that another server generates error 404. Note: If you are already using Uniform Server 5.3-Nano the accessibility test bypasses your virtual hosts, hence takes them out of the equation. If you do receive NO then it is a network issue. Only one server can be exposed to the Internet otherwise you will get a clash. All the bestRic Quote Link to comment Share on other sites More sharing options...
KWeb Posted October 23, 2009 Author Report Share Posted October 23, 2009 Ric, Thanks again for your response. I am not sure I understand what you are telling me to do. Am I downloading 5.3 Nano so that I can turn it off and then try the IP to see if it still returns a 404 error? If it does, then we know that it is hitting the wrong server? Or are you testing to see if the server is working at all? I know my server is working now because it is still serving pages for two separate domains just fine. And the server is redirecting using the vhost file for those two domains. Thanks for your help Quote Link to comment Share on other sites More sharing options...
Ric Posted October 23, 2009 Report Share Posted October 23, 2009 OK I think I am having a dim moment or just asking the wrong questions. This result:“I have tried to do the IP test and I get 404 errors. But when I look at the access logs it isn't logging any requests.” Is in conflict with this:“I know my server is working now because it is still serving pages for two separate domains just fine. And the server is redirecting using the vhost file for those two domains.” Can you perform one quick test?Goto http://translate.google.com/# Enter one of your working domains for examplehttp://site1.exampleurl.com Does the page translate? All the bestRic Quote Link to comment Share on other sites More sharing options...
KWeb Posted October 23, 2009 Author Report Share Posted October 23, 2009 No I am sure it is me that is having the dim moment! When I go to google translage, I am getting a 404 error. I guess I am kind of confused by my host. They said they changed the IP address back on my two working domains but left the site1, site2 on the new IP address. I think what is happening is they have two IP addresses assigned to my machine. The old IP address works just fine with my current working domains. The new one does not. When I try a request using the new IP address I get the 404 error and I don't see any info in the access logs. Which makes me think the new IP is not directed at my server but some other server. This is just a hypothesis though. Thanks for bearing with me on this. I really do appreciate the help. Quote Link to comment Share on other sites More sharing options...
Ric Posted October 24, 2009 Report Share Posted October 24, 2009 I think the bottom line is back to your ISP and DNS providers. 1] Your ISP should assign a single unique IP address. These are valuable resources hence using wild cards I see no reason to have two. Using the IP test above confirm this IP address works. 2] DNS, after confirming your IP address get your DNS provider or providers to point all records to this IP address. If you have access and can change the A records add a wild card entry at the bottom. Once the records have been changed it may take up to twenty fours hours for the changes to propagate and update the domain system databases. Shame that! Back to square one. All the bestRic Quote Link to comment Share on other sites More sharing options...
kangyu Posted January 8, 2010 Report Share Posted January 8, 2010 I am trying to setup some virtual hosting for a couple of development sites. I had to contact my dns host and my host to allow wildcards. They said they would have to change my IP to do this (not sure why) but they changed my IP address and they added new wildcards to the DNS records (site1. and site2. etc.) I had virtual hosts setup and working with my main domains before the move to a new IP. After they moved the IP, nothing worked. I looked at my Apache access log files and I didn't see any activity on port 80, which makes me think that possibly something is wrong in the firewall or in the dns records. Or possibly the new IP address just isn't directed to the right server. My hosts swears everything is correct and says since we are getting 404 errors the request is making it all the way to the server. So, if the requests are making its way to the server, why don't I see this in the access files? Is there some other reason that Apache wouldn't be seeing these requests on Port 80? Like I said, before the new york escort move the new york asian escort server new york escorts was functional and working great for years. I had my hosts change everything new york asian escorts back and wala it works again. Is there something else I need to change in the configuration to allow requests from a different IP? I have the NameVirtualHost * so it should accept all IP addresses, right? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.