2012-11-20 4 views
2

아파치 2가있는 kubuntu 10에서 첫 번째 C++ cgi 프로그램을 컴파일하려고합니다.쿠분투에서 C++ cgi를 실행할 수 없습니다. 10. 모든 아파치 설정을 확인했습니다. + exec + cgi-bin + api

나는 cgi-bin 폴더에 넣었습니다. 설정 파일을 검사하고, 명령에서 programm를 실행하고, 실행 권한을 변경했지만 아무것도 표시하지 않았습니다. Rekonq은 '서비스가이 파일을 처리 할 수 ​​없습니다'라고 말합니다.

나는 apache2를 얻을 수있었습니다. 그것도 다시 시작했습니다. 견과류

지금 하루 종일되었습니다. 필사적으로되었습니다. 아이디어가 있다면 나를 구할 것입니다

내 cgi-bin이 etc/apache2 /에 있습니다. 내 설정 파일 @ etc/apache2/sites-enabled/000-default 다른 답변은 다음과 같습니다. Kub10-12

이 스크린 샷에서는 모든 구성과 실행을 볼 수 있습니다. 여기에 복사도 http://img832.imageshack.us/img832/1659/cgiv.jpg

<VirtualHost *:80> 
    ServerAdmin [email protected] 

    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/ /usr/lib/cgi-bin/ 
    <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

문제는 아파치가 요청을 서비스되지 않음을 의미 (file:// URL을) 파일 시스템을 통해 직접 CGI 프로그램에 액세스하려고하는 것입니다.

대신 URL이 http://localhost/cgi-bin/cplusplus.cgi 인 로컬 호스트에서 실행중인 Apache에 연결하십시오.

+0

OMG IT WORKS! PhP 스크립트와 마찬가지로 물론 바보와 noobish 수 있습니다 !!! 그런 어리석은 질문으로 귀찮게해서 미안해하고 고맙다. – user1838656