c9k9h
asked on
Trying to access apache virtual hosts from outside LAN
Hello,
I have been hosting a single URL for a few years now and which is a registered domain, dns'd via everydns.net and running on a WAMP server. The single URL works perfect, however, I am trying to set up some new virtual hosts so that I can host multiple URLS from home. My problem is that I have got them to work from home on the LAN accessing them using http://mysite.localhost but I cant seem to access them from outside the network, nor am I able to assign a parked url to them.
My Apache configuration is as follows:
httpd.conf:
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www\zerocarbonear th"
ServerName zerocarbonearth.localhost
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www\uscarbonfree"
ServerName uscarbonfree.localhost
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www\mainediscalli ance"
ServerName mainediscalliance.localhos t
</VirtualHost>
-------------------------- ---------- ---------- ---------- ----
And for the windows hosts file:
127.0.0.1 localhost
127.0.0.1 zerocarbonearth.localhost
127.0.0.1 uscarbonfree.localhost
127.0.0.1 mainediscalliance.localhos t
Thanks!
I have been hosting a single URL for a few years now and which is a registered domain, dns'd via everydns.net and running on a WAMP server. The single URL works perfect, however, I am trying to set up some new virtual hosts so that I can host multiple URLS from home. My problem is that I have got them to work from home on the LAN accessing them using http://mysite.localhost but I cant seem to access them from outside the network, nor am I able to assign a parked url to them.
My Apache configuration is as follows:
httpd.conf:
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www\zerocarbonear
ServerName zerocarbonearth.localhost
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www\uscarbonfree"
ServerName uscarbonfree.localhost
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "C:\wamp\www\mainediscalli
ServerName mainediscalliance.localhos
</VirtualHost>
--------------------------
And for the windows hosts file:
127.0.0.1 localhost
127.0.0.1 zerocarbonearth.localhost
127.0.0.1 uscarbonfree.localhost
127.0.0.1 mainediscalliance.localhos
Thanks!
ASKER
yes, the actual domains are registered through godaddy and they are on my DNS server as dynamic domains I have a static ip address....
Just for info I looked on the web and...
www.uscarbonfree.com
This page is parked free, courtesy of GoDaddy.com at IP 68.178.232.100
www.mainediscalliance.com came back to IP 82.197.131.52
www.zerocarbonearth.com/ came back to IP 64.185.133.92
zerocarbonearth.com came back to IP: 208.67.219.132
and
mainediscalliance.com resolved back to IP 82.197.131.52
DNS issue most likely. Did you set up the DNS stuff correctly on your account pages on GoDaddy?
That's about all I can think of.
John
www.uscarbonfree.com
This page is parked free, courtesy of GoDaddy.com at IP 68.178.232.100
www.mainediscalliance.com came back to IP 82.197.131.52
www.zerocarbonearth.com/ came back to IP 64.185.133.92
zerocarbonearth.com came back to IP: 208.67.219.132
and
mainediscalliance.com resolved back to IP 82.197.131.52
DNS issue most likely. Did you set up the DNS stuff correctly on your account pages on GoDaddy?
That's about all I can think of.
John
ASKER
yea it shouldn't be as difficult as it seems...
zerocarbonearth.com is parked correctly... that is because it is on my DNS server as well as my apache server.... so it's pulling the correctly, however, when i go to the live site it is pulling the site (carbonfreeus.com) from the root directory rather than from where it is supposed to /www/zerocarbonearth. so it definitely seems like a problem with my apache settings, does this sound about right?
zerocarbonearth.com is parked correctly... that is because it is on my DNS server as well as my apache server.... so it's pulling the correctly, however, when i go to the live site it is pulling the site (carbonfreeus.com) from the root directory rather than from where it is supposed to /www/zerocarbonearth. so it definitely seems like a problem with my apache settings, does this sound about right?
ASKER
Also, shouldnt there be a way to access it directly on the backend? say http://mysite.carbonfreeus.com?
To access them locally you would need to add them to that machine's host file as far as I know. If you are running an Internet DNS service at your location, I do not know how to add a local host record and local IP to a domain name that already has INternet DNS records assigned on that DNS server.
I am confused about pulling carbonfreeus.com from your root directory when you only mention virtual servers of uscarbonfree....
John
I am confused about pulling carbonfreeus.com from your root directory when you only mention virtual servers of uscarbonfree....
John
ASKER
I have already added them to the machines host file and they work fine as far as accessing them locally. The only other domains i have on the dns server are zerocarbonearth.com and carbonfreeus.com (both in different folders on my home server) both live sites bring me to carbonfreeus.com. Should i set the zerocarbonearth.com to a secondary domain?
Also... where in apache do you set the folder permissions? i'm running filezilla client/server with full read/write/delete/append permissions and for some reason i cannot chmod any directories to say, 777, nor can I access PhpMyAdmin from outside the LAN. I'm getting a 404 error stating that I do not have permission. Any ideas here? Thanks for your help John, I really appreciate it!
Also... where in apache do you set the folder permissions? i'm running filezilla client/server with full read/write/delete/append permissions and for some reason i cannot chmod any directories to say, 777, nor can I access PhpMyAdmin from outside the LAN. I'm getting a 404 error stating that I do not have permission. Any ideas here? Thanks for your help John, I really appreciate it!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Did I truly help you?
I didn't think this would be THE correct answer. If so great and thanks, but let me know if you would if in fact this solved or helped to solve your problem.
And... what was the final fix?
Thanks
John
I didn't think this would be THE correct answer. If so great and thanks, but let me know if you would if in fact this solved or helped to solve your problem.
And... what was the final fix?
Thanks
John
If not, no one will ever see them. Make sure that they get proper DNS registrations through your DNS provider.
John