Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Total Apache newbie question... 1

Status
Not open for further replies.

Krel

Programmer
Feb 3, 2002
135
CA
OK, I just started working with Apache. I've set it up so that entering will display the appropriate file in the htdocs folder of apache. My question is, how do I configure it so that these files can be accessed remotely - from another computer?
 
That's the thing, I tried to use my IP address, but it shows a 500 internal server error. Any idea what could be wrong?
 
Ah, nevermind, sorry about the stupid question. I was screwing around, and something I did caused apache to hang. I restarted it and it works fine now. Thanks anyway!
 
Just a note on registering a domain name, I don't care for Network Solutions very much. They get about $35 a year and it takes about 72 hours to make changes to your dns records. I would check out godaddy or some of the others. They run about $8 a year and you can update your records a lot faster. Once you have your domain name, sign up with or something like it and you will be able to edit your DNS "A" and "MX" records yourself and it will take effect immediately.
 
OK, I have another question. I'm confused as to how to run CGI scripts on Apache. Whenever I try to run a perl script (which is in /htdocs) I get the following error message in the log:

[Sat May 04 13:15:36 2002] [error] [client 24.66.94.142] couldn't spawn child process: /apache/htdocs/649.pl

I'm told that I have to change something about ScriptAlias in the httpd.conf file, but the directions are kind of unclear and I'm not sure what to do. What should I change?
 
I've got this far, but it doesn't work yet:

ScriptAlias /cgi-bin/ "/apache/htdocs/cgi-bin/"

I have that line. But when I go to it gives me an internal server error.
 
set up a dir container for you cgi-bin and use the option ExecCGI. If you are running under windoze, you will need to make sure perl is installed and working properly.
 
ExecCGI is already under options in httpd.conf. Perl is installed and working properly.

What is a dir container, and how do I set one up?
 
Yeah, I put the httpd.conf in the root.
Also, note that there's the 649.pl file in there, which does not work (unable to spawn child process). In the httpd.conf file, it has this:

<Directory &quot;/apache/htdocs&quot;>
AllowOverride None
Options None
Order allow,deny
Allow from all
Options +ExecCGI
</Directory>

Doesn't this mean that is should execute CGI in the root?
 
I did the things you suggested, and I still get the same error message. I updated the httpd.conf file in the htdocs, so you can see the updated one to see if I screwed up somehow.

Thanks for all your help, BTW!
 
Hi mate,

I have just downloaded your perl file and the problem is with the path to perl..

#!/C:\Perl\bin\Perl.exe

Should be

#!/Perl/bin/Perl

Also, try to use a different script to do this first, the script that you are using may not work but others might..

Hope this helps Wullie

 
YES!! Excellent, that must have been the problem. I thought that in Windows, you would have had to put the C: in there.

If I could give you 10 stars, I would. =D

Thanks very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top