Apache on Ubuntu

Apache on Ubuntu

Posted by: pangea33
Posted on: 2008-12-08 19:20:00

I am hoping that someone can help me out. I am trying to work on some stuff for a client and his developer hard coded the fully qualified url into all of the links on the site. There are like 500 going to the full http address of his live website. I am trying to get a local copy working so that I can make changes and experiment without screwing his site up and without having to replace all occurences of those links.

Here are the entries from the relevant files on my machine. This is the same technique that I have always used with success in the past, I just never have tried to actually use www before. Incidently I did restart Apache and flush my dns cache after making these changes.

Everything seem to be working fine when I don't use the "www" subdomain, but he coded that in all of the links, so I was trying to set both url paths up. When I do go to www.wehavehomeleads.com I get routed to the real site on some other host. Is there something obvious that I am missing?

Thanks a lot for any suggestions anyone can offer me with respect to this.

From /etc/hosts:

In reply to:

127.0.0.1 www.wehavehomeleads.com
127.0.0.1 wehavehomeleads.com
127.0.0.1 whhl



From /etc/apache2/sites-enabled/000-default:

In reply to:

<VirtualHost 127.0.0.1>
ServerName www.wehavehomeleads.com
DocumentRoot /home/ben/htdocs/whhl/homedir/public_html
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName wehavehomeleads.com
DocumentRoot /home/ben/htdocs/whhl/homedir/public_html
</VirtualHost>
<VirtualHost 127.0.0.1>
ServerName whhl
DocumentRoot /home/ben/htdocs/whhl/homedir/public_html
</VirtualHost>


Re: Apache on Ubuntu

Posted by: sXi
Posted on: 2008-12-08 22:57:00

I'd do a search & replace on the hardlinks, altering them to suit your needs while you develop his site, then change them back after you're done.

But I'm lazy like that tongue




How To Install PHP.INI / ionCube on DreamHost

Re: Apache on Ubuntu

Posted by: pangea33
Posted on: 2008-12-15 15:59:00

BTW, thanks for feedback on this. Sorry it took me so long to post back. I ended up finding a workaround that helped me to just avoid dealing with the problem couldn't figure out.

Tags: hoping that someoneapache2subdomainubuntuhostsreplyapache