Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

At first it worked fine. I was running Apache on CentOS 5.5. I remember I didn't change any fancy settings to my Apache, just some virtual hosts.

Then yesterday I reinstall that server with CentOS 6.2. Installed apache and everything else. Now I can't access the website through our dyndns-ip anymore. Can anyone help? Here are some information.

  • the LAN set up is very simple. A modem, a few switches, all machines are workgrouped.

  • The modem, 192.168.1.1 already has port 80 forwarding to the web server

  • We can still browse the site using internal domain name and internal ip that points to the server.

It's when we try to access our site with dyndns-ip address that it doesn't work. We can still ping the site tho.

Here are parts of my httpd.conf that I think are relevant. xyz.dyndns-ip.com is not the real address by the way.

listen 80
NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /home/www/html
    ServerName www.riffhub.com
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot /home/www/html
    ServerName xyz.dyndns-ip.com
</VirtualHost>

I tried nmap -p 80 xyz.dyndns-ip.com and port 80 is indeed available.

How should I start fixing this problem? Any help appreciate, thanks :)

share|improve this question
    
Sounds like the virtual host isn't set up to listen on the dyndns host name? –  Alex Forbes Feb 1 '12 at 11:29
    
listen 80 - is what I have. Are there other settings I should try? –  J Penguin Feb 1 '12 at 11:35
    
What happens if you try to access directly your external IP? –  Leon Waldman Feb 1 '12 at 13:25

1 Answer 1

Make sure that the <VirtualHost> container either has ServerName or a ServerAlias directive set to the dyndns host name, e.g.:

<VirtualHost *:80>
  ServerName internal-host.localnet
  ServerAlias dyndns-address.example.com
  [...]
</VirtualHost>
share|improve this answer
    
Hi al4. I tried both ServerName and ServerAlias, both didn't work. –  J Penguin Feb 1 '12 at 11:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.