Jump to content
Sign in to follow this  
wilsonf1

Can't Get A Virtual Hostworking In Wamp - Think I'm Close

Recommended Posts

Hi, I have WAMP installed as well as IIS. IIS is on port 80, Apache runs on port 8888 via WAMP I want to be able to hit: http://www-mydomain-co-uk:8888 and for it to bring up: http://localhost :8888/mydomain/index.php So far I have taken these steps: httpd.conf:

<VirtualHost *:8888>DocumentRoot /www/mydomainServerName www-mydomain-co-uk# Other directives here</VirtualHost>

and hosts file:

127.0.0.1 www-mydomain-co-uk

When I hit http://www-mydomain-co-uk:8888 I get: Forbidden You don't have permission to access / on this server. So I'm on the right lines but what the ###### is up?

Share this post


Link to post
Share on other sites

A permission error means that the user that the server is running under does not have permission to access the files in the directory you're telling it to.

Share this post


Link to post
Share on other sites
A permission error means that the user that the server is running under does not have permission to access the files in the directory you're telling it to.
I have right clicked the www folder and mydomain folder and gone to security, all 4 users have READ rights, that's ok isn't it?

Share this post


Link to post
Share on other sites
Increase their rights and see if it makes a difference.
zero! is there a specific user permissions should be set for for Apache? IIS used to have a specific user didn't it where you play with the permissions, I forget the name now

Share this post


Link to post
Share on other sites

Couple of questions: Why is there an * on the first line? Should it be www-mydomain-co-uk to stop it affecting other requests? Should DocumentRoot be fully qualified or does it not matter? <VirtualHost *:8888>DocumentRoot C:/wamp/www/mydomainServerName www-mydomain-co-uk</VirtualHost>

Share this post


Link to post
Share on other sites
It sounds like the document root is not correct.
Is it to do with the * on the first line? <VirtualHost *:8888> Does that mean pick up any request going through :8888? My current code is:
<VirtualHost *:8888>DocumentRoot C:/wamp/www/mydomain/ServerName www-mydomain-co-uk</VirtualHost>

And further down

DocumentRoot "c:/wamp/www/"

Share this post


Link to post
Share on other sites
The * is the IP address, so it's binding to port 8888 on all IPs.
Makes sense. It's as soon as I put in this row all localhost:888/ directories stop working, I just cannot see why: DocumentRoot "C:/wamp/www/mydomain/" Infact, when I now hit: http://localhost:8888/ - I get the same page as www-mydomain-com Now does THAT make sense? Edited by wilsonf1

Share this post


Link to post
Share on other sites

SOLVED!!!! This is the solution: <VirtualHost *:8888>DocumentRoot "C:/wamp/www"ServerName localhost</VirtualHost><VirtualHost *:8888>DocumentRoot "C:/wamp/www/mydomain/"ServerName www-mydomain-co-uk</VirtualHost> Thanks justsomeguy for looking

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...