Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

403 Errors and Virtual Hosts

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


bubaphex at gmail

Jul 16, 2008, 9:38 PM

Post #1 of 2 (250 views)
Permalink
403 Errors and Virtual Hosts

Hi there,

Just wondering if some one could give me a hand with my Virtual Host

# mysite
<VirtualHost 0.0.0.0:80 <http://0.0.0.0/>>
ServerName mysite.co.nz
RewriteEngine on
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.mysite.co.nz/$1 [NE,R]
</VirtualHost>

<VirtualHost 0.0.0.0:80 <http://0.0.0.0/>>
ServerAdmin myemail [at] mysite
DocumentRoot /var/www/html/mysite
ServerName www.mysite.co.nz
ErrorDocument 403 /var/www/html/mysite403/index.html
</VirtualHost>

Thats what my current virtual host looks like. Im trying to get my 403
errors for a certain website to display that index file. Its not working
this way, can some one please advise where i have gone wrong ?

cheers


solprovider at apache

Jul 18, 2008, 8:35 AM

Post #2 of 2 (215 views)
Permalink
Re: 403 Errors and Virtual Hosts [In reply to]

On 7/17/08, Rob <bubaphex [at] gmail> wrote:
> Just wondering if some one could give me a hand with my Virtual Host
> # mysite
> <VirtualHost 0.0.0.0:80>
> ServerName mysite.co.nz
> RewriteEngine on
> RewriteCond %{HTTP_HOST} !^$
> RewriteRule ^/(.*) http://www.mysite.co.nz/$1 [NE,R]
> </VirtualHost>
>
> <VirtualHost 0.0.0.0:80>
> ServerAdmin myemail [at] mysite
> DocumentRoot /var/www/html/mysite
> ServerName www.mysite.co.nz
> ErrorDocument 403 /var/www/html/mysite403/index.html
> </VirtualHost>
> Thats what my current virtual host looks like. Im trying to get my 403
> errors for a certain website to display that index file. Its not working
> this way, can some one please advise where i have gone wrong ?

See http://httpd.apache.org/docs/2.0/mod/core.html#errordocument

The second ErrorDocument parameter is either a message or a page found
like a URL redirect. Do you have a webpage at this location?
http://mysite.co.nz/var/www/html/mysite403/index.html
My guess is you configured an absolute filepath and Apache httpd is
handling the value as a relative URL.

solprovider

---------------------------------------------------------------------
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 [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.