Strona 1 z 1

cgi-bin - brak dostępu

: 23 kwietnia 2012, 16:09
autor: AL|EN
Witajcie.

Próbuję przywrócić do życia stronę: http://www.miranda-wizard.com/pl/ na własnym serwerze. Strona wcześniej działała gdzie indziej i mam problemy z uruchomieniem jej funkcjonalności.

Strona po kliknięciu przycisku pobierania plików ma uruchomić program cgizipd jako skrypt cgi, który z katalogu /var/www/files/ "złączy" pliki default.zip oraz /lang/pl.zip w jeden i przeniesie do katalogu /var/www/download a następnie wyśle żądanie do pobrania złączonego pliku Miranda-IM.zip.

Niestety po kliknięciu przycisku pobierania wyświetlany jest błąd:

Kod: Zaznacz cały

Forbidden
 You don't have permission to access /generate/ on this server.
 

Czy ktoś mógłby na to rzucić okiem i mi pomóc bo już nie wiem co może być źle.
  1. Konfiguracja apache2 (najważniejsze na samym końcu).

    Kod: Zaznacz cały

    #
    
    LockFile ${APACHE_LOCK_DIR}/accept.lock
    PidFile ${APACHE_PID_FILE}
    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 15
    
    <IfModule mpm_prefork_module>
        StartServers          5
        MinSpareServers       5
        MaxSpareServers      10
        MaxClients          150
        MaxRequestsPerChild   0
    </IfModule>
    
    <IfModule mpm_worker_module>
        StartServers          2
        MinSpareThreads      25
        MaxSpareThreads      75 
        ThreadLimit          64
        ThreadsPerChild      25
        MaxClients          150
        MaxRequestsPerChild   0
    </IfModule>
    
    <IfModule mpm_event_module>
        StartServers          2
        MaxClients          150
        MinSpareThreads      25
        MaxSpareThreads      75 
        ThreadLimit          64
        ThreadsPerChild      25
        MaxRequestsPerChild   0
    </IfModule>
    
    # These need to be set in /etc/apache2/envvars
    User ${APACHE_RUN_USER}
    Group ${APACHE_RUN_GROUP}
    
    AccessFileName .htaccess
    
    <Files ~ "^\.ht">
        Order allow,deny
        Deny from all
        Satisfy all
    </Files>
    
    DefaultType text/plain
    
    HostnameLookups Off
    
    ErrorLog ${APACHE_LOG_DIR}/error.log
    
    #
    # LogLevel: Control the number of messages logged to the error_log.
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    #
    LogLevel debug
    
    # Include module configuration:
    Include mods-enabled/*.load
    Include mods-enabled/*.conf
    
    # Include all the user configurations:
    Include httpd.conf
    
    # Include ports listing
    Include ports.conf
    
    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    # If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
    #
    LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
    
    # Include of directories ignores editors' and dpkg's backup files,
    # see README.Debian for details.
    
    # Include generic snippets of statements
    Include conf.d/
    
    # Include the virtual host configurations:
    Include sites-enabled/
    
    ScriptAlias /generate /usr/lib/cgi-bin/ 
    
    <Directory /usr/lib/cgi-bin/>
    SetHandler cgi-script
    Options +ExecCGI
    </Directory>
  2. Konfiguracja strony 000-default

    Kod: Zaznacz cały

    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
    
        DocumentRoot /var/www
        <Directory />
            Options FollowSymLinks
            AllowOverride None
        </Directory>
        <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride all
            Order allow,deny
            allow from all
        </Directory>
        <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Order allow,deny
            Allow from all
        </Directory>
    
        ErrorLog ${APACHE_LOG_DIR}/error.log
    
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
    
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    
        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>
  3. Katalogi:

    [INDENT]www: /var/www/
    Pliki *.zip do łączenia: www: /var/www/files
    CGI: /usr/lib/cgi-bin/ (tam jest plik wykonywalny cgzipd)[/INDENT]