Link to home
Start Free TrialLog in
Avatar of c9k9h
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\zerocarbonearth"
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\mainediscalliance"
ServerName mainediscalliance.localhost
</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.localhost


Thanks!
Avatar of Johnjces
Johnjces
Flag of United States of America image

Are your virtual domains regsitered in an Internet DNS Service like your single URL through everydns.net?

If not, no one will ever see them. Make sure that they get proper DNS registrations through your DNS provider.

John
Avatar of c9k9h
c9k9h

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
Avatar of c9k9h

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?
Avatar of c9k9h

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
Avatar of c9k9h

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!
ASKER CERTIFIED SOLUTION
Avatar of Johnjces
Johnjces
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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