Jump to content
The Uniform Server Community

Unable to resolve host name


jayuk20
 Share

Recommended Posts

I just installed US on Windows 7 and set up vhosts the following way:

 

<VirtualHost _default_:80>

DocumentRoot C:/UniServer/www

ServerName localhost

ErrorLog "logs/error.log"

CustomLog "logs/access.log" common

</VirtualHost>

 

<VirtualHost *:80>

ServerAdmin webmaster@mydomain.com

DocumentRoot C:/UniServer/www/mydomain.com

ServerName mydomain.com

ServerAlias www.mydomain.com *.mydomain.com

ErrorLog logs/mydomain.com-error.log

CustomLog logs/mydomain.com-access.log common

<Directory "C:\UniServer\www\mydomain.com">

Options Indexes Includes

AllowOverride All

Require all granted

</Directory>

</VirtualHost>

 

In httpd.conf

 

ServerName www.mydomain.com:80

 

Listen 80

 

In .htaccess

 

Order Deny,Allow

Deny from all

Allow from 127.0.0.1 192.168

Allow from ::1

 

 

Also when I ping my domain it comes back as 127.0.0.1 when it should be my IP address. My DNS is hosted with No-IP Plus.

Link to comment
Share on other sites

I just installed US on Windows 7 and set up vhosts the following way:

 

DocumentRoot C:/UniServer/www

ServerName localhost

ErrorLog "logs/error.log"

CustomLog "logs/access.log" common

 

ServerAdmin webmaster@mydomain.com

DocumentRoot C:/UniServer/www/mydomain.com

ServerName mydomain.com

ServerAlias www.mydomain.com *.mydomain.com

ErrorLog logs/mydomain.com-error.log

CustomLog logs/mydomain.com-access.log common

Options Indexes Includes

AllowOverride All

Require all granted

 

You have to make sure that DocumentRoot C:/UniServer/www/mydomain.com is a folder and your site files will go into that mydomain.com folder

 

In httpd.conf

 

ServerName localhost

 

In .htaccess

 

#Order Deny,Allow

#Deny from all

#Allow from 127.0.0.1 192.168

#Allow from ::1

 

Note you have to comment it to allow external access. Read the .htaccess info:

# Server root folder www .htaccess

# This file provides server security limiting access to the localhost only.

# Comment next four lines to deactivate. (Allows external access)

 

Also when I ping my domain it comes back as 127.0.0.1 when it should be my IP address. My DNS is hosted with No-IP Plus.

Your No-IP resolves to your external IP fine almost sure. You have to ensure your firewall (Router/Windows Firewall) isn't blocking port 80.

 

Your domain comes back as 127.0.0.1 (loopback address) because when you create your virtual host most likely UniServer added it to your hosts file (C:\WINDOWS\system32\drivers\etc\hosts) so you can resolve locally. using a different computer and pinging yourdomain.com should resolve back to your external IP address since DNS will knock at your No-IP DNS server.

 

Hope this help

<p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p>

Link to comment
Share on other sites

Ok thanks.

 

I have made changes as suggested and put some test files in my mydomain folder but the domain and WAN IP still do not resolve. The online status is still saying its offline.

 

I have the W7 firewall off and I have XAMPP installed on my XP laptop and that seems to work fine when its on.

Link to comment
Share on other sites

Ok thanks.

 

I have made changes as suggested and put some test files in my mydomain folder but the domain and WAN IP still do not resolve. The online status is still saying its offline.

 

I have the W7 firewall off and I have XAMPP installed on my XP laptop and that seems to work fine when its on.

Do you have the No-IP client installed in your UniServer machine? is it configured in the router? How it that working on your end?

 

Get on any machine in your network and ping your domain name... it should resolve to your external IP even when your webserver is not running/accessible.

 

command prompt:

 

>ping yourdomain.com

pinging yourdomain.com [xx.xx.xx.xx] It has to resolve to your external IP regardless because that's DNS resolving and not your UniServer installation...

 

Browse locally to http://xx.xx.xx.xx/yourdomain.com/ and you should hit your uniserver website (xx.xx.xx.xx is the local IP of your webserver host e.g 10.1.1.50)

 

This will clear up if the issue is with your UniServer or DNS not resolving for other reasons...

<p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p>

Link to comment
Share on other sites

When I ping my domain it gives me my wan ip

That means DNS is resolving properly to your dynamic IP with your No-IP service.

 

and browsing locally on localhost...

 

This hints to believe the test was performed on the same machine your webserver is installed... which is running properly.

 

or LAN IP works fine and connects to my /mydomain folder

 

I'll assume you tested it by browsing from a different computer other than your UniServer "server" which tells me that your webserver is up and running...

 

I also have the no ip client installed

Good.

 

 

Then I can only think of your firewall blocking your webserver and not an .htaccess file in www or www/yoursite/ configured not to allow external connections because your server will respond with Forbidden 404 error and you mentioned earlier that there is no connection whatsoever.

 

Hints: Firewall / Port Forwarding

 

 

Try the following:

 

Even when you mentioned you turned off Windows Firewall I would like you to add an exception rule... Add Uniserver/usr/local/apache2/bin/httpd1.exe to your firewall exception list (make sure you enable Home/Work and Public access)

 

Let us know

<p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p>

Link to comment
Share on other sites

Did you look at the HOSTS file?

 

If you used the vhosts setup in Coral, this will add an entry corresponding to your domain name that resolves to 127.0.0.1 . It's a feature, not a bug. :)

This is created for TESTING your setup without requiring a domain change. It's just one more thing to remember when setting up for production.

 

Regards,

BobS

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...