Jump to content

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


wilsonf1
 Share

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?

Link to comment
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?
Link to comment
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>

Link to comment
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/"

Link to comment
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
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...