Jump to content

Recommended Posts

Posted

Hello potential helpers!

 

Not sure where to put this thread.

 

I've set up Apache on my Linux computer to serve up pages for a testing environment. I mostly develop software and it should speed up my development process.

 

Anyway, at one point I had it working and now I just can't seem to find out how to get it going again. I switch HDs, so I reinstalled everything.

 

I have SSI (Server Side Includes) on some of my web pages. I know that SSI works because using the "#include exe=" works. However, if I try "#include virtual=" the script (using perl) does not process. Instead I end up viewing my perl code ... the text. I use symobolic references to get at my perl script directory.

 

I think it's something to do with my Apache configuration files, but I've adjusted all that I think I need ... still nothing. I've given the options as "Alll" and include the correct prefix. Not sure what I'm missing here.

 

I'm using Mandrake 10.0 Linux with Apache 2.0.

 

I've been stuck for a while on this. Just can't seem to get by it. If you can help ... thank you in advance!

Posted

When you use "virtual" includes, it basically makes another call to the webserver, so the webserver needs to know how to handle it.

 

So, if the file your including is "/somedir/somefile.pl" for example... if you go to "http://localhost/somedir/somefile.pl" with your browser, the output you get is the same as what the include will get (which I believe in your case would be just source code).

 

There's basically 3 ways to correct this (exclusive of each other)...

  1. Put the perl script in a ScriptAlias directory (like /cgi-bin). It's already setup to execute CGI's.
  2. Add something like "AddHandler cgi-script .cgi .pl" to your httpd.conf file. This will allow cgi's with those extentions to be run from any directory.
  3. Enable "ExecCGI" for the directory you have the script in (see apache documentation for ways to do this).

Number 2 is probably your simplest option, and would be a good choice to make your environment better match TCH's.

Posted

Btw, I should mention that "AddHandler cgi-script .cgi .pl" or something very similar is probably already in your httpd.conf. You probably just need to uncomment it.

Posted

Thanking you just doesn't come close to my appreciation on this. I was barking up the wrong tree the whole time.

 

As a completely hetrosexual man, having 6 kids and a wife of 15 years to prove it, I would give you a square kiss on the lips for the help you just gave to me.

 

I'm sure now you have a new appreciation for working from your very REMOTE location ... :dance:

 

Seriously, it worked just like ... in seconds! Restarted the apache server and received the multitue of script errors I have been hoping for! Thank you! TYVM! TY TY TY! :heart (that's as close as I'll get ... I promise :dance:

 

I was so fixated that it was related to Options that my brain didn't go anywere else. Seeing also that I'm not that expereinced on server end didn't help either.

 

So again ... thank you!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...