Click to See Complete Forum and Search --> : Path/Directory problem


Wibble
01-31-2003, 06:31 PM
OK. I've just got a web serer up and running. RH 7.3 running Apache. It's working OK. I wanted to see if I could run a cgi script. I used a tutorial from htmlgoodies.com on putting a counter on a web page.

It didn't work. I thought it might be the path to the script, so I put an image file in the cgi-bin dir (I'm using the default file locations - /var/www/html for the pages, /var/html/cgi-bin for the cgi script).
The image doesn't show on the page either. I've tried putting all sorts of paths to this test image. No joy at all.

Oh, and also (although this isn't a major prob) - If I want to view my pages on my internal network, I have to use the internal address, if I put the domain name into the browser, it won't display.

Gaston
01-31-2003, 07:21 PM
I take that your httpd.conf you've got the following set
correctly. Find the following section:

ScriptAlias /cgi-bin/

After that you need to specify the path to your cgi-bin dir, in quotes, for example "/usr/bin/cgi-bin" so the whole line
would look like:

ScriptAlias /cgi-bin/ "/usr/bin/cgi-bin"

(note the space in between)

Also, the script you've created, is it executable?

If not, use chmod and change it to executable:

chmod 755 filename

Is your server using DNS? if not, that would explain why
it won't translate to the hostname. Try to ping your servers
hostname while logged on it, if no reply but you can ping
your server's IP-address, then no DNS is used. You can
also try to browse to http://yourserversipaddress, if that
works, DNS is your issue.

Wibble
02-01-2003, 07:41 AM
Thanks for the reply.
The ScriptAlias was set as yout stated. I had made the file executable, but did it again, just to make sure.

Still no joy.

http://www.htmlgoodies.com/beyond/countcgi.html is the place where I found the instructions and script.

On the webserver itself, I can ping the hostname, the domain name and the IP address. On my XP desktop I can ping the domain name, the webservers internal IP address but NOT the hostname. If I want to view the webpages the webserver is serving, whilst on my XP desktop, I can only do it by entering the internal IP of the webserver. The domain name or its IP address will not work.

I'm sitting on a LAN at home, with a Smoothwall router/firewall. It's no major problem why I canm't view them, I'm just curous.