You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by IrishStudent76 <gr...@gmail.com> on 2011/02/06 23:20:36 UTC

[users@httpd] VirtualHost Question

Hi all,

I'm starting my final project for college, I decided to look at using the
zend framework to develop a web app, I was advised in a book on the zend
framework to create a vitualhost for my project, which I've done but all I
can see is the It Works! message if I try to navigate to the index.php page
I get an error message stating that the page is not on the server.

I've edited my httpd-vhosts.conf file to include the following

[code]
<Directory ""C:/Program Files (x86)/Apache Software
Foundation/Apache2.2/htdocs/">
  Order Deny,Allow
  Allow from all
</Directory>
[/code]

[code]
<VirtualHost 127.0.0.1:80>
    ServerAdmin webmaster@dummy-host2.localhosi
    DocumentRoot "C:/Program Files (x86)/Apache Software
Foundation/Apache2.2/htdocs/square/public"
    ServerName square.localhost
</VirtualHost>
[/code]

I've also edited my hosts file to include the following
[code]
127.0.0.1 square.localhost
[/code]

Can someone please point out what I'm doing wrong.

Thanks in advance
-- 
View this message in context: http://old.nabble.com/VirtualHost-Question-tp30859374p30859374.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Question

Posted by IrishStudent76 <gr...@gmail.com>.
Hi Eric,

I tried your suggestion but all that is displayed still is the itWorks! page
not the zend framework page.

Any ideas? I'm heading to bed but will answer any replies tomorrow

Thanks for your help

Graham

Eric Covener wrote:
> 
>>    DocumentRoot "C:/Program Files (x86)/Apache Software
>> Foundation/Apache2.2/htdocs/square/public"
> 
> Try moving your DocumentRoot out of Program Files -- there are some
> complications when you try to edit files there as a normal user then
> access them as a service.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 

-- 
View this message in context: http://old.nabble.com/VirtualHost-Question-tp30859374p30859714.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Question

Posted by IrishStudent76 <gr...@gmail.com>.
Hi Eric,

I believe that I've sorted the issue, it appears to be the route to the
public index page. I'm following a book in learning the zend framework but
it appears to have a few typos and lack of information in general.

Thanks for your help.


Graham


Eric Covener wrote:
> 
>> My problem is that if I enter http://sqaure/ I receive a 403 error "You
>> don't have permission to access / on this server". However if I enter
>> http://square/public I the default zend framework index.php page appears.
> 
> What does your error log say?
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/VirtualHost-Question-tp30859374p30885936.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Question

Posted by Eric Covener <co...@gmail.com>.
> My problem is that if I enter http://sqaure/ I receive a 403 error "You
> don't have permission to access / on this server". However if I enter
> http://square/public I the default zend framework index.php page appears.

What does your error log say?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Question

Posted by IrishStudent76 <gr...@gmail.com>.
Ok I;m now at the following situation with this.

I've edited my settings for Apache by following this page
http://foundationphp.com/tutorials/apache22_vhosts.php

I have moved my DocumentRoot to c:/htdocs

I have created a folder c:/WebDocs.

I've edited my httpd-vhosts.conf file to the following please note I've left
out the default code that appears in the file for clarity here.

NameVirtualHost *:80

<Directory C:/WebDocs>
  Order Deny,Allow
  Allow from all
</Directory>


<VirtualHost *:80>
    DocumentRoot C:/htdocs
    ServerName localhost
</VirtualHost>

<VirtualHost *:80>
    DocumentRoot C:/WebDocs/square/
    ServerName square
</VirtualHost>

My problem is that if I enter http://sqaure/ I receive a 403 error "You
don't have permission to access / on this server". However if I enter
http://square/public I the default zend framework index.php page appears.

Can anyone please tell me what I'm missing.

Thanks,


Graham

-- 
View this message in context: http://old.nabble.com/VirtualHost-Question-tp30859374p30868238.html
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] VirtualHost Question

Posted by Eric Covener <co...@gmail.com>.
>    DocumentRoot "C:/Program Files (x86)/Apache Software
> Foundation/Apache2.2/htdocs/square/public"

Try moving your DocumentRoot out of Program Files -- there are some
complications when you try to edit files there as a normal user then
access them as a service.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org