wilsonf1 Posted October 13, 2011 Share Posted October 13, 2011 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 More sharing options...
wilsonf1 Posted October 13, 2011 Author Share Posted October 13, 2011 In fact! Just realised that adding this to httdp.conf: <VirtualHost *:8888>DocumentRoot /www/mydomainServerName www-mydomain-co-uk</VirtualHost> Even breaks: http://localhost:8888/mydomain/ which the same 403 Forbidden error - is that normal?!?!?! Link to comment Share on other sites More sharing options...
justsomeguy Posted October 13, 2011 Share Posted October 13, 2011 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. Link to comment Share on other sites More sharing options...
wilsonf1 Posted October 13, 2011 Author Share Posted October 13, 2011 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 More sharing options...
justsomeguy Posted October 13, 2011 Share Posted October 13, 2011 Increase their rights and see if it makes a difference. Link to comment Share on other sites More sharing options...
wilsonf1 Posted October 13, 2011 Author Share Posted October 13, 2011 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 Link to comment Share on other sites More sharing options...
wilsonf1 Posted October 13, 2011 Author Share Posted October 13, 2011 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 More sharing options...
wilsonf1 Posted October 13, 2011 Author Share Posted October 13, 2011 Holy *** its working! <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Allow from all</Directory> This said DENY so I changed it! Link to comment Share on other sites More sharing options...
wilsonf1 Posted October 13, 2011 Author Share Posted October 13, 2011 Problem is, it's cutting out my other sites like: http://localhost:8888/other-website/ They all have 404's now?! Link to comment Share on other sites More sharing options...
justsomeguy Posted October 13, 2011 Share Posted October 13, 2011 It sounds like the document root is not correct. Link to comment Share on other sites More sharing options...
wilsonf1 Posted October 13, 2011 Author Share Posted October 13, 2011 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 More sharing options...
justsomeguy Posted October 13, 2011 Share Posted October 13, 2011 The * is the IP address, so it's binding to port 8888 on all IPs. Link to comment Share on other sites More sharing options...
wilsonf1 Posted October 13, 2011 Author Share Posted October 13, 2011 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? Link to comment Share on other sites More sharing options...
wilsonf1 Posted October 13, 2011 Author Share Posted October 13, 2011 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.