[SLUG] .htaccess files

Mark Feather akwe-xavante at firenet.uk.com
Fri Aug 29 00:29:01 BST 2003


> Hi
>
> I have altered my Apache and FTP config files along with the
> directory structure of my Linux box to resemble the structure
> of the server where my Websites are hosted with great success
> inc the use of symlinks to redirect services such as bash and perl.
>
> This means that all my html and script content matches and
> works perfectly on my Linux box at home and where my websites
> are hosted eliminating the need to continuously alter shebang
> lines in scripts and code in my html code to suite each location.
>
> However i still have one problem left.....My .htaccess files have html
> ErrorDocuments within them to control errors.   The ErrorDocuments are
> written in html which are displayed to the visitors browser
> complete with hyperlinks and mailto links etc
>
> This causes problems because i need to write in full URL
> addresses for hyperlinks which obviously fail on my local
> machine as they do not exist.
>
> My Linux box has no internet connection but is on a LAN so
> that i can browse from a Windows machine for the testing of my work.
>
> What do i need to alter to make the URL address
http://akwe.freeshell.org point to a specific user html directory
allowing the use of scripts and SSI's etc to continue.

Thanks for your response Ian, i've sorted it.....well half way there!

You need to enter a line into the Hosts file:

127.0.01    akwe.freeshell.org  (i can also use the IP address of the NIC)

then add the following into Apache's configuration file:

ServerName akwe.freeshell.org

<VirtualHost akwe.freeshell.org>

DocumentRoot /www/ag/a/akwe (path to html root directory)
ServerName akwe.freeshell.org

</VirtualHost>

this has sorted out my DocumentError problem but it has created 2 other
problems to resolve......

Using the Virtual URL address on the linux box the server displays pages in
the correct location but cannot find my users cgi-bin!   It can find it
using the localhost address though.   The servers error log reads: invalid
CGI ref "../cgi-bin/bcu/counter.pl" in /www/ag/a/akwe/bcu/index.shtml   Any
thoughts and ideas?  I guess i have to add content between the VirtualHost
container or alter my config file somewhere else but where?

My windows machine can find the website using the ip address of the linux
box in the URL address and cgi scripts run correctly but when i use the
virtual address all i get is a std ie error page "page cannot be displayed"!
Any thoughts and ideas welcome.

Mark





More information about the Scarborough mailing list