LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   getting apache to show pages (https://www.linuxquestions.org/questions/linux-newbie-8/getting-apache-to-show-pages-216110/)

steste 08-11-2004 03:47 AM

getting apache to show pages
 
sorry if this seems stupid bit i have installed apache on my machine as i want to test cgi scripts etc that i write. When i point the browser to my machine i get the apache test page which means its running ok. It says that i shuld replace this page. Where is it to replace? What im asking is where do i save my work to in prder for the server to show it? many thanks.

allan_y 08-11-2004 04:01 AM

Depending on which linux system you're running, the directory where you should place your cgi files should be in /var/www/

you should also make sure your httpd.conf file has the appropriate seetings for apache to serve cgi script

cheers

steste 08-11-2004 04:06 AM

Quote:

Originally posted by allan_y
Depending on which linux system you're running, the directory where you should place your cgi files should be in /var/www/

you should also make sure your httpd.conf file has the appropriate seetings for apache to serve cgi script

cheers

As in the cgi-bin? Apparantly i dont have write access there?

allan_y 08-11-2004 04:20 AM

you'll need to run as root and have something similar to the following in your httpd.conf section 2:

<Directory "/var/www/your_directory_of_cgi_stuff">
Options ExecCGI
AllowOverride Limit
Order allow,deny
Allow from all
</Directory>

hope that works for ya

steste 08-11-2004 04:34 AM

Quote:

Originally posted by allan_y
you'll need to run as root and have something similar to the following in your httpd.conf section 2:

<Directory "/var/www/your_directory_of_cgi_stuff">
Options ExecCGI
AllowOverride Limit
Order allow,deny
Allow from all
</Directory>

hope that works for ya

thank you for your help so far but it will not let me save any changes i make to httpd.conf and as far as i am awrae i am running as root

steste 08-11-2004 05:50 AM

have changed the file and nave saved my little cgi file in cgi-bin but it wont run. the browser just shows the code.

proudclod 08-11-2004 06:58 AM

chmod the file to 755.
Either that or you have to set up apache to process files that are .cgi as cgi files.

Do you have perl installed?

steste 08-11-2004 07:23 AM

Quote:

Originally posted by proudclod

Either that or you have to set up apache to process files that are .cgi as cgi files.

how would i go about doing that?

Quote:

Originally posted by proudclod

Do you have perl installed?

Nope - using python.


All times are GMT -5. The time now is 04:11 AM.