help needed with set up ...still
Posted by: peter23 (---.as13285.net)
Date: March 23, 2013 10:15PM

I'm still struggling to set up.
I was having trouble with 404 errors on dynamic url links

Using the following line in the httpd.con file: virtualdocumentroot E:/wamp/www/%0
I can get them to work properly so local site's added to the wamp/www directory mirror the live site...but I can't get the wamp server homepage to show up.

If I remove virtualdocumentroot E:/wamp/www/%0 I can get wampserver homepage to show with the directories listed under projects. When I click on the directory I get the live site but then I'm back to the old problem of dynamic links giving 404 errors.

It guess it's such a simple cock up but i cannot understand it.

Any help will be appreciated. I'd like to be able to go to my sites from the wampserver homepage

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: RiggsFolly (---.as13285.net)
Date: March 24, 2013 03:43PM

Peter,

I am not totally sure why you want to link to your live site from the wamp home page but if that is all you would like to do this feature may be a whole lot simpler.

In this example I will create a link in the VHOSTS section of the wamp main page to microsoft.com.

Create a file in c:\wamp\vhosts\
The file name should be the url of the site you want to link to with a .conf extention at the end.

So create a file called www.microsoft.com.conf in c:\wamp\vhosts the file does not need anything in it, wamp just uses the filename and removes the .conf part to make a url.

A link will appaer in the VHOSTS section of the wamp main page and when clicked will go to that site



Edited 1 time(s). Last edit at 03/24/2013 06:54PM by RiggsFolly.

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: peter23 (---.as13285.net)
Date: March 25, 2013 11:33AM

Sorry I've miss-worded so have thrown you. when I said live site I meant active site from local.
So I now have a local site structure and can view any site I add to the www directory by including them in the host file...and using the following line in the httpd.con file: virtualdocumentroot E:/wamp/www/%0

But I no longer see my wampserver home page when putting [localhost] in the browser - i get the message "can't establish connection".

If I remove the virtualdocumentroot E:/wamp/www/%0 line from httpd.con I see the wampserver, and the projects listed, but when I open any of the projects they open in localhost/project name and the dynamic urls no longer work. I assume because the structure is no longer correct.

So my ideal outcome would be a wampserver homepage with all my projects listed and when I click on a project it behaves like it would when I have virtualdocumentroot E:/wamp/www/%0 line in http.con active

Sorry I'm struggling to explain clearly because it's all unclear. Once I understand what all the bits do I imagine this is simple stuff!

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: peter23 (---.as13285.net)
Date: March 25, 2013 11:36AM

Whoops Ignore But I no longer see my wampserver home page when putting [localhost] in the browser - i get the message "can't establish connection".

the message is a 404 "requested url not found"

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: RiggsFolly (---.as13285.net)
Date: March 25, 2013 01:13PM

Dont use virtualdocumentroot its far to complex.

Use the mechanism I suggested it is afterall expressly designed for displaying your VHOSTS to you in a clickable way.

instead of creating a file called www.microsft.com.conf create one called whatever-your-vhost-is-called.conf

so if you had a vhost called site1.dev create a file called site1.dev.conf

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: peter23 (---.as13285.net)
Date: March 26, 2013 07:10PM

That's a good tip but doesn't sort out my problem it takes me to wampserver where I can see the site listed under

It's just a simple thing I want to do but I can't seem to explain it clearly enough
I have a live site. I have set up Wamp
I want to download a copy of my live site and place it in the www folder. make a change to a file or two and then view that site on my computer so I can learn how to make it better without affecting the live one.
I want everything to work the same way so I don't have to edit two files. I can make changes and when happy use that file to replace the one on my live site.

Say my site is mysite.local and it's added to the host file as
127.0.0.1 mysite.local

and to vhosts.conf as

<VirtualHost *:80>
ServerName mysite.local
DocumentRoot "E:/wamp/www/mysite.local"
</VirtualHost>

If I then type mysite.local in a browser I see the wampserver index page and under "My Projects" is mysite.local

If I click on that link I get mysite.local/mysite.local and a site that delivers 404 errors on all dynamic links from the mysite index page

If I add #virtualdocumentroot E:/wamp/www/%0 in the httpd.conf file I see mysite.local when I put that in the browser url and all the links work, but if I go to local host I see requested url not found.

So how do I get the wampserver home page to show when I put localhost in the browser with links appearing under the My Projects heading and when I click on them i go to a fully working site with dynamic generate pages from the index page?

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: RiggsFolly (---.as13285.net)
Date: March 27, 2013 01:15PM

Why dont you install TeamViewer so I can connect up and see exactly what you are doing as we seem to be going round and round the mulberry bush here.

Its free for private use.

If you go for this option send me a Private mesage with the ID and PASSWORD and a time you are available
I am on GMT time

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: peter23 (---.as13285.net)
Date: March 27, 2013 01:32PM

I'm uneasy about giving strangers access to me computer - sorry nothing against you
And I'm sure the problem is so simple once it's understood how simple it is.

I've added the question to stack overflow to see if I get any other options there. I just thought here would be perfect as you guys appear to do a superb job. Just me not being able to explain clearly enough.

try this version

I have installed Wamp so I can run a few simple dynamic sites that I built (with help). I want to be able to have three or four and learn how to do things at local level and then upload the improved files to the live site without having to rewrite sections due to different location/paths etc.

To get WampServer index page to show I go to http-vhosts.conf and add

<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "E:/wamp/www"
</VirtualHost>

I understand that I put my site directory labelled mysite.local into the E:wamp/www so the path becomes E:wamp/www/mysite.local. I then go to http-vhosts.conf and add

<VirtualHost *:80>
ServerName mysite.local
DocumentRoot "E:/wamp/www/mysite.local"
</VirtualHost>

my host file has

127.0.0.1 localhost
127.0.0.1 mysite.local

and my httfp.conf has

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

So my problem with all this done I get my WampServer index showing fine when I type localhost in the url, and mysite.local appears on that index page under "Your Projects" which is all good, but when I click on the mysite.local link from WampServer, the url changes to localhost/mysite.local not mysite.local, and then when I click a page link from localhost/mysite.local I get localhost/mysite.local/linkedpage as the url and a 404 error.

mysite.local as the url also brings up the WampServer index page

If I comment out ServerName localhost from http-vhosts.conf and restart apache. I get what I'm after when I try mysite.local as the url - mysite works and all the dynamic links work. but the WampServer index is then a 404 error.

All I want to be able to do is log in to WampServer and visit various sites from "Your Projects" list.

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: RiggsFolly (---.as13285.net)
Date: March 27, 2013 01:53PM

Tell me what happens when you keyin mysite.local on the browser address.

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: peter23 (---.as13285.net)
Date: March 27, 2013 01:58PM

as above
mysite.local as the url also brings up the WampServer index page

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: RiggsFolly (---.as13285.net)
Date: March 27, 2013 02:19PM

It must be your vhost definitions, if a vhost is not defined properly apache will display the first vhost it finds in the list of vhosts, hence it always shows your wamp page even when you use mysite.local as the url.


Ok try this:

put your site into a physical folder called c:\wamp\www\mysite ( loose the .local )

Change your vhost accordingly in fact use this example instead of your vhost definitions

## must be first so the the wamp menu page loads
<VirtualHost *:80>
DocumentRoot "E:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "E:/wamp/www">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "E:/websrc/www/mysite"
ServerName mysite.local
ServerAlias mysite.local
Options Indexes FollowSymLinks
<Directory "D:/websrc/www/mysite">
AllowOverride All
Order Deny,Allow
Allow from 127.0.0.1
# assuming your internal network is on subnet 129.168.1 add this line
# so you can get to your site from other computers inside your router
Allow from 192.168.1
</Directory>
</VirtualHost>



Let me know what happens

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: peter23 (---.as13285.net)
Date: March 27, 2013 02:39PM

wamp icon is orange doesn't go to green.

I assume there are several things wrong with your suggested copy paste above...
I use E drive so shouldn't it be e:\wamp\www\mysite ?

also you added
<Directory "D:/websrc/www/mysite">
I don't use D? shouldn't that be <Directory "E:/websrc/www/mysite">

ServerName mysite.local
ServerAlias mysite.local


Now get green light and localhost is WampServer. but mysite in browser brings up google search not the site and the link from WampServer takes me to localhosts/mysite with 404 errors on any deeper pages

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: RiggsFolly (---.as13285.net)
Date: March 27, 2013 03:00PM

Thanks for the spelling corrections, i took that from my working vhost file and missed a couple of changes.

Try one more thing, go to your site and when it shows the wrong thing hit CTRL+F5 both together to force a refresh of the browser cache.

Otherwise I am afraid I dont have the time to bounce this to and fro, I have to earn a living as well as help out here, for which I do not get paid!

If you want more help then try the Team Viewer router and I think we can solve this in a few minutes. I have done this for many people in the past, in fact I just finished helping an American who trusted me enough to leave team viewer running and go to work while I got his system sorted.

Options: ReplyQuote
Re: help needed with set up ...still
Posted by: zdy (27.17.16.---)
Date: March 28, 2013 03:54AM

Why choose Asterisk to build a PBX over other open-source solutions?
"There are several SIP implementations that are OSS, but they are primarily what are known as "call proxies" instead of more full-featured PBX applications. This means that they function only to connect two endpoints together, and are basically just large, fast, directory servers. Examples of SIP Proxies are ser and Vocal."
Is Asterisk the only PBX that can rewrite CID name on the fly? Check Freeswitch
[url= [url]http://www.cusabio.com/s_antibody.html[/url]]antibody drug[/url]

Options: ReplyQuote


Sorry, only registered users may post in this forum.