Debian Each CGI/Prel Problem

F

FoKu

Mitglied
Hallo erstmal, ich bin neu hier :)

Also ich habe mir hhier zuhause einen Rechner hingestellt. Dort habe ich Debian raufgespielt, es klappt auch alles wunderbar naja so halb zumindest *gg*.

Ich habe ein Scrip namens "OsTube" installiert das ist sowas in der Richtung wie YouTube. FFMPEG und alles was man dafür braucht ist auch schon installiert.

Mein Problem ist jetzt das wenn ich bspw. ein Bild oder ein Video hochladen will bekomme ich volgenden Error:

Code:
Error: 500 Internal Server Error

Und dann will mein Browser die .pl datei die für den upload zuständig ist runterladen.

Ich habe jetzt schon überall rumprobiert und gegooglet aber nichts gefunden was mir hilft.

Und festgestellt habe ich durch das rumprobieren das ich überhautkeine .pl datein ausführen kann, wenn ich das machen will will mein Browser die halt immer runterladen.

Ich hoffe mir kann da jemand von euch helfen. Die Hauptsache ist das es erstmal funktioniert das ich überhaupt Perl datein ausführen kann wie z.B. dieses hier:

Code:
#!/usr/bin/perl -w

use strict;

print "Content-type: text/html\n\n";
print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">', "\n";
print "<html><head><title>Test-Ausgabe</title></head><body>\n";
print "<h1>Hurra, es klappt!</h1>\n";
print "</body></html>\n";

Das ist eine Test Perl datei nichtmal die funktioniert.

Mfg der FoKu
 
Ich bin mit CGI nicht so bewandert. Aber hast du das CGI modul installiert für Apache(2) (falls es nicht ohnehin schon dabei ist/war)?
 
Also Perl oder CGI mäßig habe ich nichts installirt nur halt Apache2...

Hab es grad getestet über apt-get install cgi kann ich es nicht installieren das selbe habe ich mit Prel gemacht das ist installiert.
 
Weißt du wie man Pakete sucht unter Debian? :)
Code:
apt-cache search DAS_PAKET
Suchst du Pakete. Such da mal nach libapache2 und cgi usw. Ich bin mir da nicht sicher obs schon installiert ist oder nicht.

Da fragst du lieber Google und die wunderbare Doku von Debian :)
 
Also hab gemacht was du gesagt hast nach liapache2 und cgi gesucht das hier hat er ausgespuckt.

libapache2:
Code:
libapache-mod-jk-doc - Documentation of libapache-mod-jk/libapache2-mod-jk packages
libapache-mod-php4 - server-side, HTML-embedded scripting language (apache 1.3 module)
libapache-mod-php5 - server-side, HTML-embedded scripting language (apache 1.3 module)
libapache2-mod-jk - Apache 2 connector for the Tomcat Java servlet engine
libapache2-mod-php4 - server-side, HTML-embedded scripting language (apache 2 module)
libapache2-mod-php5 - server-side, HTML-embedded scripting language (apache 2 module)
php4-cgi - server-side, HTML-embedded scripting language (CGI binary)
php5-cgi - server-side, HTML-embedded scripting language (CGI binary)
libapache2-mod-annodex - Provides server-side support for Annodex media
libapache2-mod-apreq2 - generic Apache request library - Apache module
libapache2-mod-auth-kerb - apache2 module for Kerberos authentication
libapache2-mod-auth-pam - module for Apache2 which authenticate using PAM
libapache2-mod-auth-pgsql - Module for Apache2 which provides pgsql authentication
libapache2-mod-auth-plain - Module for Apache2 which provides plaintext authentication
libapache2-mod-auth-sys-group - Module for Apache2 which checks user against system group
libapache2-mod-bt - BitTorrent tracker for the Apache2 web server
libapache2-mod-bt-dev - Header files for mod_bt
libapache2-mod-cband - An Apache 2 module for bandwidth limiting the webserver
libapache2-mod-chroot - run Apache in a secure chroot environment
libapache2-mod-dnssd - Apache 2 module which adds Zeroconf support via avahi
libapache2-mod-encoding - Apache2 module for non-ascii filename interoperability
libapache2-mod-fcgid - an alternative module compat with mod_fastcgi
libapache2-mod-geoip - GeoIP support for apache2
libapache2-mod-ldap-userdir - Apache2 module that provides UserDir lookups via LDAP
libapache2-mod-macro - Create macros inside apache2 config files
libapache2-mod-mime-xattr - Apache2 module to get MIME info from filesystem extended attributes
libapache2-mod-mono - Run ASP.NET Pages on UNIX with Apache 2 and Mono
libapache2-mod-musicindex - Browse, stream, download and search through MP3/Ogg/FLAC files
libapache2-mod-perl2 - Integration of perl with the Apache2 web server
libapache2-mod-perl2-dev - Integration of perl with the Apache2 web server - development files
libapache2-mod-perl2-doc - Integration of perl with the Apache2 web server - documentation
libapache2-mod-proxy-html - Apache2 filter module for HTML links rewriting
libapache2-mod-python - Apache 2 module that embeds Python within the server
libapache2-mod-python-doc - Apache 2 module that embeds Python within the server
libapache2-mod-removeip - Module to remove IP from apache2's logs
libapache2-mod-ruby - Embedding Ruby in the Apache2 web server
libapache2-mod-scgi - Apache module implementing the SCGI protocol
libapache2-mod-shib - Shibboleth implements the OASIS SAML v1.1 specification,
libapache2-mod-speedycgi - apache2 module to speed up perl scripts by making them persistent
libapache2-mod-suphp - Apache2 module to run php scripts with the owner permissions
libapache2-mod-vhost-hash-alias - Fast and efficient way to manage virtual hosting
libapache2-mod-vhost-ldap - Apache 2 module for Virtual Hosting from LDAP
libapache2-modbt-perl - Perl bindings for mod_bt
libapache2-modxslt - XSLT processing module for Apache 2.0.x based on libxml2
libapache2-redirtoservname - Apache 2 module to redirect users to the canonical hostname
libapache2-request-perl - generic Apache request library - Perl modules
libapache2-svn - Subversion server modules for Apache
libapache2-webauth - Apache 2 modules for WebAuth authentication
libapache2-webkdc - Apache 2 modules for a WebAuth authentication KDC
libnet-bittorrent-libbt-tracker-perl - Perl bindings for libbttracker
mod-chroot-common - run Apache in a secure chroot environment
mod-musicindex-common - Common files for mod-musicindex
modxslt-doc - Documentation for modxslt
mono-apache-server - backend for mod_mono Apache module
mono-apache-server2 - backend for mod_mono2 Apache module
libapache-mod-auth-mysql - Apache module for MySQL authentication
libapache2-mod-auth-mysql - Apache 2 module for MySQL authentication
libapache2-mod-jk2 - Apache 2.0 connector for the Tomcat Java servlet engine
libapache2-mod-layout - Apache2 web page content wrapper
libapache2-mod-python2.2 - An Apache 2 module that embeds Python 2.2 within the server
libapache2-mod-python2.3 - An Apache 2 module that embeds Python 2.3 within the server
libapache2-mod-rpaf - module for Apache2 which takes the last IP from the 'X-Forwarded-For' header
libapache2-mod-security - Tighten web applications security for Apache 2.x
libapache2-mod-xmlrpc2 - XMLRPC Server module for Apache2 web server
mod-security-common - Tighten web applications security - common files
libapache2-mod-musicindex-aac - Browse, stream, download and search through MP3/Ogg/FLAC files

cgi
Code:
libcgi-session-perl - Persistent session data in CGI applications
libcgi-simple-perl - A Simple totally OO CGI interface that is CGI.pm compliant
libcgi-ssi-parser-perl - used in CGI scripts for parsing SSI directives
libcgi-ssi-perl - perl CGI::SSI - Use SSI from CGI scripts
libcgi-untaint-perl - Process CGI input parameters
libcgi-xml-perl - perl module for converting CGI variables from/to XML
libcgi-xmlapplication-perl - perl module for creating XML-DOM and OO based CGI scripts
libcgi-xmlform-perl - perl module for reading/generating formatted XML
libcgi0 - library for CGI programs in C
libcgicc-doc - A C++ class library for writing CGI applications
libcgicc1 - A C++ class library for writing CGI applications
libcgicc1-dev - A C++ class library for writing CGI applications
libcgicg1 - C library for developing CGI applications
libcgicg1-dev - C library for developing CGI applications
libcherokee-base0 - extremely fast and flexible web server - libraries
libcherokee-base0-dev - extremely fast and flexible web server - development files
libcherokee-client0 - extremely fast and flexible web server - libraries
libcherokee-client0-dev - extremely fast and flexible web server - development files
libcherokee-server0 - extremely fast and flexible web server - libraries
libcherokee-server0-dev - extremely fast and flexible web server - development files
libclass-dbi-fromcgi-perl - Update Class::DBI data using CGI::Untaint
libclass-default-perl - Perl module to make static calls apply to a default instantiation
libcxxtools-dev - library of unrelated but useful C++ classes
libcxxtools3 - library of unrelated but useful C++ classes
libdbix-recordset-perl - Perl extension for DBI recordsets
libecgi-dev - An ANSI C library for the creation of CGI applications
libecgi0 - An ANSI C library for the creation of CGI applications
libembperl-perl - A system for building dynamic websites with Perl
libfcgi-dev - Header files of FastCGI
libfcgi-perl - FastCGI Perl module
libfcgi-procmanager-perl - Functions for managing FastCGI applications.
libfcgi-ruby1.8 - FastCGI library for Ruby
libfcgi0c2 - Shared library of FastCGI
libgcgi-dev - library for CGI programs in C
libgcgi0 - library for CGI programs in C
libghc6-cgi-dev - Haskell CGI library for GHC
libghc6-wash-dev - Web Authoring System for Haskell
libhtml-embperl-perl - Library for embedding perl in HTML
libhtml-table-perl - Perl module for creating HTML tables
libhtml-template-ruby - A Ruby Class to use HTML Templates
libhttp-request-ascgi-perl - Setup a CGI enviroment from a HTTP::Request
libhttp-server-simple-perl - Simple stand-alone http daemon
libimage-size-perl - determine the size of images in several common formats
libjavascript-rpc-perl - Perl module to process Remote procedure calls from JavaScript
libkwiki-perl - Kwiki Wiki Building Framework
liblog-tracemessages-perl - Perl module to allow for trace messages in Perl code
libmagick++9c2a - The object-oriented C++ API to the ImageMagick library
libmail-rfc822-address-perl - Perl extension for validating email addresses
libnet-xmpp-perl - XMPP Perl library
libnmz7 - Namazu shared library
libnmz7-dev - libnmz header files and static libraries.
libnora-ruby1.8 - Web Application Library for ruby
libocamlnet-ocaml - OCaml application-level Internet protocols and conventions library
libocamlnet-ocaml-dev - OCaml application-level Internet protocols and conventions library
libtemplates-parser-dev - Ada library to parse files and replace variables with their values
libtemplates-parser10 - Ada library to parse files and replace variables with their values
libtext-header-perl - RFC 822/2068 header and unheader functions
libvalidate-net-perl - Perl module for validating Net:: related strings
libwiki-toolkit-formatter-usemod-perl - UseModWiki-style formatting for CGI::Wiki
linesrv - A server to remotely control the internet connection
linesrv-mysql - A server to remotely control the internet connection
lxr - Linux Cross-Reference
mailto - WWW Forms to Mail Gateway
man2html - turns a web-browser and an httpd-server into a man pager
mapserver-bin - mapserver binary utilities
mapserver-doc - documentation for mapserver
mathopd - Very small, yet very fast HTTP server
mini-httpd - a small HTTP server
mmm-mode - Multiple Major Mode for Emacs
mrtg-rrd - The script for generating graphs for MRTG statistics
mserv - local centralised multiuser music server
mserv-cgi - CGI scripts for local centralised multiuser music environment
namazu2 - Full text search engine (namazu binary and cgi)
namazu2-common - Full text search engine (Document files)
namazu2-index-tools - Full text search engine (Tools for index handling)
ncbi-epcr - [Biology] Tool to test a DNA sequence for the presence of sequence tagged sites
ncbi-epcr-data - [Biology] NCBI public STS data
nikto - web server security scanner
nut-cgi - A web interface sub system for the nut - Network UPS Tools
pas2html - Highlight Pascal and Modula-2 sources for WWW presentation
php-cgiwrap - allows ordinary users to run their own CGI scripts and adds support for PHP
php4-mapscript - module for php4-cgi to use mapserver
php5-mapscript - module for php5-cgi to use mapserver
poppass-cgi - a CGI script to interact with a poppassd server
postman - High performace web based IMAP and NNTP client
primer3 - [Biology] Tool to design flanking oligo nucleotides for DNA amplification
pyca - Certification Authority written in python
python-albatross - Toolkit for Stateful Web Applications
python-albatross-doc - documentation for the Albatross Web Toolkit
python-dhm - Collection of Python utilities
python-flup - Implements Python Web Server Gateway Interface (WSGI)
python-htmlgen - Python library for the generation of HTML
python-paste - Tools for using a Web Server Gateway Interface stack
python-pyorbit-dev - PyORBit: development files
python-scgi - Server-side implementation of the SCGI protocol
python-templayer - layered template library for Python
python-urwid - curses-based UI/widget library for Python
python-weblib - Yet another web programming framework for Python - library
python-weblib-doc - Yet another web programming framework for Python - docs
qdbm-cgi - QDBM Database CGI commands
remember-el - remember text within Emacs
remstats - Remote Statistics System: collectors and presentation-cgis
sbox-dtc - A CGI wrapper script for chrooted environment for hosting
smokeping - latency logging and graphing system
snoopy - An execve() wrapper and logger
snort - Flexible Network Intrusion Detection System
snort-common - Flexible Network Intrusion Detection System [common files]
snort-doc - Documentation for the Snort IDS [documentation]
snort-mysql - Flexible Network Intrusion Detection System [MySQL]
snort-pgsql - Flexible Network Intrusion Detection System [PostgreSQL]
speedy-cgi-perl - speed up perl scripts by making them persistent
spl-webspl - SPL based web application framework
squid3-cgi - A full featured Web Proxy cache (HTTP proxy) - control CGI
stx2any - Converter from structured plain text to other formats
tcllib - the Standard Tcl Library
tdiary - a communication-friendly weblog system
thttpd - tiny/turbo/throttling HTTP server
thttpd-util - Support utilities for thttpd
tntnet - modular, multithreaded web application server for C++
twiki - A Web Based Collaboration Platform
uprecords-cgi - A CGI script to show the world your highest uptimes
usemod-wiki - Perl-based Wiki clone
viewcvs-query - view CVS (viewcvs-query.cgi)
w3c-linkchecker - W3C Link Checker
w3c-markup-validator - W3C Markup Validator
w3cam - a simple CGI to retrieve images from video4linux device.
wdg-html-validator - WDG HTML Validator
webauth-weblogin - Central login server for WebAuth authentication
webfs - lightweight http server for static content
wpp - The Web Preprocessor - a Perl script to preprocess HTML files
xapian-omega - CGI search interface and indexers using Xapian
xmltv-util - Utilities related to the XMLTV file format for TV listings
yaws - high performance HTTP 1.1 webserver written in Erlang
zonecheck-cgi - A DNS configuration checker, Web interface
axkit - An XML Application Server for Apache
caudium - An extensible WWW server written in Pike
caudium-perl - Perl script support for Caudium
escm - Embedded Scheme Processor
framerd - a scalable knowledge base development and application platform
jitterbug - A cgi-bin tool for problem reporting and tracking
lg-issue34 - Issue 34 of the Linux Gazette.
libapache-mod-python2.1 - An Apache module that embeds Python 2.1 within the server
libapache-mod-python2.2 - An Apache module that embeds Python 2.2 within the server
libapache-mod-python2.3 - An Apache module that embeds Python 2.3 within the server
libapache2-mod-python2.2 - An Apache 2 module that embeds Python 2.2 within the server
libapache2-mod-python2.3 - An Apache 2 module that embeds Python 2.3 within the server
libbusiness-ups-perl - A Perl interface to the UPS shipping costs web-site
libdbix-cgi-perl - CGI Extension for libdbix-easy-perl
libfcgi-ruby1.6 - FastCGI library for Ruby
libfcgi0 - Shared library of FastCGI
libmagick++6 - The object-oriented C++ API to the ImageMagick library
libnora-ruby1.6 - Web Application Library for ruby
libroxen-ics - Internet Conferencing System module for the Roxen Challenger web server
libroxen-referrerdeny - File deny module for the Roxen Challenger web server
libswt-gtk3 - Standard Widget Toolkit for GTK native library
libswt-gtk3-java - Standard Widget Toolkit for GTK Java library
libswt-gtk3-jni - Standard Widget Toolkit for GTK JNI library
libswt-motif3-java - Standard Widget Toolkit for Motif JAR library
libswt-motif3-jni - Standard Widget Toolkit for Motif JNI library
libswt-mozilla3-java - Standard Widget Toolkit for GTK Mozilla Java library
libswt-mozilla3-jni - Standard Widget Toolkit for GTK Mozilla JNI library
nms-cookielib - library containing cookie manipulation subroutines
nms-countdown - Time countdown on web pages
nms-ffa - Maintain a simple database of web links
nms-formmail - Send emails from web forms
nms-guestbook - Web guestbook
nms-rand-image - displays a random image on a webpage
nms-rand-link - displays a random link on a webpage
nms-rand-text - displays a random piece of text on a webpage
nms-search - simple web search engine
nms-ssi-rand-image - displays a random image as Server Side Include
nms-textclock - Displays the current time on a web page
nms-textcounter - display the number of people who have visited your web site
perl2html - Highlight perl sources for WWW presentation
php3-cgi - server-side, HTML-embedded scripting language (CGI binary)
php3-cgi-gd - GD (graphic creation) module for PHP3 (use with php3-cgi)
php3-cgi-imap - IMAP module for PHP3 (use with php3-cgi)
php3-cgi-ldap - LDAP module for PHP3 (use with php3-cgi)
php3-cgi-magick - ImageMagick module for PHP3 (use with php3-cgi)
php3-cgi-mhash - mhash module for PHP3 (use with php3-cgi)
php3-cgi-mysql - Mysql module for PHP3 (use with php3-cgi)
php3-cgi-pgsql - PostgreSQL module for PHP3 (use with php3-cgi)
php3-cgi-snmp - SNMP module for PHP3 (use with php3-cgi)
php3-cgi-xml - XML module for PHP3 (use with php3-cgi)
python2.1-htmlgen - Generation of HTML documents with Python scripts
python2.1-weblib - Yet another web programming framework for Python - library
python2.2-albatross - Toolkit for Stateful Web Applications (v2.2)
python2.2-dhm - Collection of Python utilities, python2.2 version
python2.2-htmlgen - Generation of HTML documents with Python scripts
python2.2-pyorbit - A Python language binding for the ORBit2 CORBA implementation
python2.2-weblib - Yet another web programming framework for Python - library
python2.3-albatross - Toolkit for Stateful Web Applications (v2.3)
python2.3-dhm - Collection of Python utilities, python2.3 version
python2.3-htmlgen - Generation of HTML documents with Python scripts
python2.3-pyorbit - A Python language binding for the ORBit2 CORBA implementation
python2.3-scgi - Server-side implementation of the SCGI protocol.
python2.3-weblib - Yet another web programming framework for Python - library
thy - A tiny and fast http daemon
usermin - a web interface for user tasks
websieve - Web based Cyrus IMAP user admin client
zopectl - Zope instances controlling utility

Ich denke mal installiert ist alles.

Sonst noch eine Idee?

Achja und er so die perl sachen von diesem Verzeichniss aus ausführen /var/www/htdocs/cgi-bin/

EDIT// Ich habe bei Google leider kein HOWTO gefunden :(
 
Hallo,

ist dir der Unterschied zwischen CGI und einem apache-Modul bewußt?

Bei CGI wird der Programmaufruf an einen *externen* Interpreter übergeben (das Perl-Binary z.B.) und der Webserver wartet auf die Antwort. Dazu muß in der Apache-Config die endung ".pl" auch mit dem Interpreter verknüpft werden.

CGI hat dabei aber den Nachteil, daß für jeden Aufruf ein Interpreter-Prozeß gestartet werden muß. Deshalb sind in der Regel apache-Module ergonomischer.

Suche mal nach Apache-Modulen für Perl, bei Debian "libapache2-mod-perl" oder sowas.
 
Du brauchst kein PHP5-CGI. Was du brauchst ist 'libapache2-mod-perl2' für Apache2 oder libapache2-mod-perl für Apache1. Ausserdem muss für das entsprechende VirtualHost für das DocumentRoot 'Option ExecCGI' gesetzt sein. Und dein Perl-Skript muss ein 'exit 0' zurückgeben, wenn es fehlerfrei abgearbeitet wurde. Und ein Handler für .pl-Dateien muss natürlich existieren.
 
@Jabo & bitmuncher

Ich war mir selber nicht sicher, deswegen hab ich ja auch nichts 100%ig garantiert ;)
Da ich mich nie mit CGI beschäftigt habe. :)
 
@Tomekk228
Dankesehr ich werde mir das gleich mal anschen:)

@bitmuncher
Ich habe gerade libapache2-mod-perl2 installiert. Kannst du mir sagen wie und wo ich das jetzt einstellen muss damit .pl datein ausgeführt werden?

EDIT// Ich bin neu in der Materie aber ich lerne schnell :) und das "Handler für .pl" hab ich nicht ganz verstanden wie und in welcher Datei und so ich das machen muss.
EDIT2// ich bin jetzt im Chat das ist vill einfachere *gg sobald Java installiert ist
 
Zuletzt bearbeitet:
hast du da eine "loadmodule.conf"? Schau mal, daß da das Perl-Modul überhaupt geladen wird.

Auf jeden Fall nach Änderungen mal Apache neu laden:
rcapache2 reload sollte das tun
 
Zum ersten ich weiss nicht wo ich die Datei suchen also in welchem ordner und zum zweiten sagt er mir das er den Befehl nicht findet.
 
Zuerstmal aktivierst du das Modul mit 'a2enmod' und editierst dann die /etc/apache2/sites-enabled/000-default. Dort ist normalerweise dein Standard-VirtualHost definiert, mit einer Directory-Direktive für /var/www. Bei dieser fügst du an die vorhandenen 'Options'-Einträge einfach 'ExecCGI' hinzu. Zum Schluss natürlich mit '/etc/init.d/apache2 restart' den Webserver neustarten.

@Jabo: Hier geht es um Debian und nicht um SuSE.
 
Zum ersten ich weiss nicht wo ich die Datei suchen also in welchem ordner und zum zweiten sagt er mir das er den Befehl nicht findet.
schau mal, wie in /etc/inid.d/ das Apache-Startscript heißt, ich dachte "apache2"....

Das sollte auch gehen:
/etc/init.d/<Startscript-Name> reload

Und dabei root sein...

Erst mal Apache reloaden / neu starten, evtl ist das mit der Modul-Installation schon alles gemacht worden.
 
Also Apache ist neugestartet allergings bekomm ich diese meldung das war sonst nicht so:

Code:
Forcing reload of web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using 0.0.0.0 for ServerName
 waiting apache2: Could not reliably determine the server's fully qualified domain name, using 0.0.0.0 for ServerName

Die IP`s habe ich jetzt durch 0 ersetzt muss ja nicht jeder meine Ip wissen.

Und funktionieren tut es auch noch nicht also das mit dem Perl.

EDIT// Nochmal nebenbei ich habe die "test.pl" nich im verzeichnis /usr/lib/cgi-bin/ sondern in meinem ftp Verzeichniss das wäre dann diese hier /var/www/htdocs/cgi-bin/ und von da aus sollen auch die .pl dateien ausgeführt werden.
 
Zuletzt bearbeitet:
EDIT// Nochmal nebenbei ich habe die "test.pl" nich im verzeichnis /usr/lib/cgi-bin/ sondern in meinem ftp Verzeichniss das wäre dann diese hier /var/www/htdocs/cgi-bin/ und von da aus sollen auch die .pl dateien ausgeführt werden.
Da gehören aber auch keine Webserver-Daten hin, "usr" steht für "unix system resource". Nie nicht gehören Nutz-Daten da hinein...

Debian macht DocumentRoot unter /var/www/htdocs, cgi-bin sollte unter /var/www/cgi-bin/ sein.

Nur dann wird es als auszuführende Aufgabe erkannt, sonnst als "Dokument" angezeigt. Was ja auch passiert.
.
.
.
EDIT (autom. Beitragszusammenführung) :
.

@Jabo: Hier geht es um Debian und nicht um SuSE.
Wieder zeitgleich gepostet... hast Recht, hab ich gerade durcheinander gebracht
 
Zuletzt bearbeitet:
Also wenn ich das jetzt richtig verstanden hab soll ich den cgi-bin Ordner im Verzeichniss /var/www/ anlegen ja?

EDIT// Der Server (ein zweiter Rechner) steht hier bei mir zuhause also es ist ein Heimserver den ich nur für mich selbst benutze das nur noch mal zur info.
 
Zuletzt bearbeitet:
Also Apache ist neugestartet allergings bekomm ich diese meldung das war sonst nicht so:

Code:
Forcing reload of web server (apache2)...apache2: Could not reliably determine the server's fully qualified domain name, using 0.0.0.0 for ServerName
 waiting apache2: Could not reliably determine the server's fully qualified domain name, using 0.0.0.0 for ServerName
Den "fehler" hab ich bis dato auch.

Stört allerdings mich nicht, apache2 läuft trotzdem. Aber auf die Lösung würde ich mich auch freuen.

/etc/hosts >
Code:
127.0.0.1 localhost
127.0.1.1 alucard
PC heißt alucard. Hab schon hunderte von Lösungsvorschläge durch gelesen. Aber keine half bis dato.
 
Naja mein Apache läuft auch ich weiss nur nicht ob er einen reboot gemacht hat *gg

EDIT// Ich kann mit meinem Benutzer den ich mir angelegt habe mit dem FTP Programm auf nur auf das Verzeichniss /var/www/htdocs/ zugreifen und halt alles was ich in das Verzeichniss reinlade. In das Verzeichniss /var/www/ komm ich mit meinem angelegten benutzer nicht rein.
 
Zuletzt bearbeitet:
Deine /etc/apache2/sites/enabled/000-default muss etwa so aussehen:

Code:
NameVirtualHost *:80
<VirtualHost *:80>
        ServerAdmin foo@bar.com
        ServerName localhost

        DocumentRoot /var/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /var/www/htdocs/cgi-bin/
        <Directory "/var/www/htdocs/cgi-bin/">
                AllowOverride None
                Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined
        ServerSignature On
    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Damit sollte dein Skript unter http://localhost/cgi-bin/deinskript.pl aufrufbar sein und da hier ein ServerName gesetzt ist, dürfte auch dein ServerName-Problem erledigt sein.

Edit: Wichtig... mit a2enmod muss das Modul 'cgi' aktiviert worden sein, das Perl-Skript muss für den Webserver ausführbar sein (chmod a+rx /var/www/htdocs/cgi-bin/deinskript.pl) und es muss ein 'exit 0' zurückgeben.

Edit 2: Im übrigen ist das Default-CGI-Verzeichnis bei Debian immer /usr/lib/cgi-bin.
 
Zuletzt bearbeitet:

Ähnliche Themen

ca. 1200 PDF-Dateien auslesen und bestimmte Daten in eine CSV-Datei speichern

Breite einer Tabelle via CSS definieren

dovecot und postfix Konfiguration Problem

Perl auf SAT-Receiver

Hilfe mit CGI

Zurück
Oben