jayuk20 Posted April 17, 2012 Report Share Posted April 17, 2012 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,AllowDeny from allAllow from 127.0.0.1 192.168Allow 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. Quote Link to comment Share on other sites More sharing options...
Yoni Posted April 17, 2012 Report Share Posted April 17, 2012 I just installed US on Windows 7 and set up vhosts the following way: DocumentRoot C:/UniServer/wwwServerName localhostErrorLog "logs/error.log"CustomLog "logs/access.log" common ServerAdmin webmaster@mydomain.comDocumentRoot C:/UniServer/www/mydomain.comServerName mydomain.comServerAlias www.mydomain.com *.mydomain.comErrorLog logs/mydomain.com-error.logCustomLog logs/mydomain.com-access.log commonOptions Indexes IncludesAllowOverride AllRequire 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 Quote <p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p> Link to comment Share on other sites More sharing options...
jayuk20 Posted April 17, 2012 Author Report Share Posted April 17, 2012 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. Quote Link to comment Share on other sites More sharing options...
Yoni Posted April 17, 2012 Report Share Posted April 17, 2012 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.compinging 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... Quote <p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p> Link to comment Share on other sites More sharing options...
jayuk20 Posted April 18, 2012 Author Report Share Posted April 18, 2012 When I ping my domain it gives me my wan ip and browsing locally on localhost or land ip works fine and connects to my /mydomain folder I also have the no ip client installed Quote Link to comment Share on other sites More sharing options...
Yoni Posted April 18, 2012 Report Share Posted April 18, 2012 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 installedGood. 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 Quote <p class="bbc_center"><span style="font-size:12px;"><strong>Yoni</strong></span></p> Link to comment Share on other sites More sharing options...
BobS Posted April 18, 2012 Report Share Posted April 18, 2012 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 Quote Link to comment Share on other sites More sharing options...
jayuk20 Posted April 18, 2012 Author Report Share Posted April 18, 2012 Ok guys I've done everything in this thread but no luck at all! I'm going to try an old Windows XP Pro install and see if that works. 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.