Problem mit Apache + SSL und dem ausführen von CGIs

Apache, Lighttpd, nginx, Cherokee
Post Reply
teamwolf
Posts: 23
Joined: 2003-09-14 12:45
 

Problem mit Apache + SSL und dem ausführen von CGIs

Post by teamwolf »

Tach zusammen !!

Hab einen Apache 1.3.27 und mod_ssl installiert. Certfitikate erstellt.
Funktioniert auch bei html Seiten. Nur wenn ein CGI ausgeführt werden soll weigert sich der Apache beharrlich und der Browser bricht ohne Verbindung ab. Ich hab schon viel rumgesucht und probiert aber bisher ohne Erfolg ...
Bei selber Konfiguration ohne SSL laufen die Scripte wunderbar.

Hier mal der VHost Eintrag:

Code: Select all

<VirtualHost 127.0.0.1:443>
  # General setup for the virtual host
    DocumentRoot "/Users/erik/Ordner/"
  #ServerName has to match the server you entered into the CSR
    ServerName 127.0.0.1
    ServerAdmin reisswolf@macnews.de
    ErrorLog /var/log/httpd/error_log
    TransferLog /var/log/httpd/access_log
  # SSL Engine Switch:
  # Enable/Disable SSL for this virtual host.
    SSLEngine on
    SSLProtocol all -SSLv3
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  # Path to your certificates and private key           
    SSLCertificateFile /etc/httpd/ssl.key/server.crt
    SSLCertificateKeyFile /etc/httpd/ssl.key/server.key
	
    <Files ~ ".(cgi|shtml|phtml|php3?)$">
      SSLOptions +StdEnvVars
    </Files>
	<Directory /Users/erik/Ordner/Info.woa/wa/Query>
		SSLOptions +StdEnvVars
 	</Directory>
# correction for browsers that don't always handle SSL connections well
    SetEnvIf User-Agent ".*MSIE.*" 
    nokeepalive ssl-unclean-shutdown 
    downgrade-1.0 force-response-1.0
# Per-Server Logging:
# The home of a custom SSL log file. Use this when you want a
# compact non-error SSL logfile on a virtual host basis.
    CustomLog /var/log/httpd/ssl_request_log 
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"
</VirtualHost>
Hat jemand ne Idee woran das liegen kann ?

Gruß
Erik
jlinker
Posts: 248
Joined: 2002-07-08 20:07
 

Re: Problem mit Apache + SSL und dem ausführen von CGIs

Post by jlinker »

Da fehlt wohl die Direktive:

ScriptAlias /cgi-bin/ /Users/erik/Ordner/

Das hast DU beim normalen Vhost auf Port 80 auch drinn stehen. Muss also auch beim 443 (SSL) rein. 8)
teamwolf
Posts: 23
Joined: 2003-09-14 12:45
 

Re: Problem mit Apache + SSL und dem ausführen von CGIs

Post by teamwolf »

jlinker wrote:Da fehlt wohl die Direktive:

ScriptAlias /cgi-bin/ /Users/erik/Ordner/

Das hast DU beim normalen Vhost auf Port 80 auch drinn stehen. Muss also auch beim 443 (SSL) rein. 8)
Hmm geht aber irgendwie immer noch nicht. Mir gehen so langsam echt die Ideen aus. :cry: Stell ich mich zu blöde an ? Man möge es mir sagen ...
Aber trotzdem Danke für die Antwort.
jlinker
Posts: 248
Joined: 2002-07-08 20:07
 

Re: Problem mit Apache + SSL und dem ausführen von CGIs

Post by jlinker »

Poste bitte mal die Definition vom normalen vhost (port80)
teamwolf
Posts: 23
Joined: 2003-09-14 12:45
 

Re: Problem mit Apache + SSL und dem ausführen von CGIs

Post by teamwolf »

jlinker wrote:Poste bitte mal die Definition vom normalen vhost (port80)
Hier mal der komplette Auszug. Hoffe du findest den Grund !!

Code: Select all

<IfModule mod_ssl.c>
# Some MIME-types for downloading Certificates and CRLs
  AddType application/x-x509-ca-cert .crt
  AddType application/x-pkcs7-crl .crl

# inintial Directives for SSL
  SSLProtocol all -SSLv3
  SSLPassPhraseDialog builtin
  SSLSessionCache dbm:/var/run/ssl_scache
  SSLSessionCacheTimeout 300
  SSLMutex file:/var/run/ssl_mutex
  SSLRandomSeed startup builtin
  SSLLog /var/log/httpd/ssl_engine_log          
  SSLLogLevel info
  
##
## SSL Virtual Host Context
##
<VirtualHost 127.0.0.1:80>
    SSLEngine off
    DocumentRoot "/Users/erik/Ordner/"
    ServerName 127.0.0.1
	<Directory /Users/erik/Ordner>
		DAV On
		AuthType Digest   
		AuthName "iTools"
		AuthDigestDomain "/"
		AuthDigestFile /Users/erik/Ordner/.htdigest
		AllowOverride None
		Options None
		<Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> 
			Require valid-user 
		</Limit> 
	</Directory>
	<Directory /Users/erik/Ordner/WebObjects/Info.woa/wa/Query>
        SetHandler cgi-script
        Options All
	</Directory>
</VirtualHost>

<VirtualHost 127.0.0.1:443>
    DocumentRoot "/Users/erik/Ordner/"
    ServerName 127.0.0.1
	ScriptAlias /cgi-bin/ /Users/erik/Ordner/WebObjects/Info.woa/wa/Query/
    ErrorLog /var/log/httpd/error_log
    TransferLog /var/log/httpd/access_log

    SSLEngine on
    SSLProtocol all -SSLv3
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile /etc/httpd/ssl.key/server.crt
    SSLCertificateKeyFile /etc/httpd/ssl.key/server.key
	
    SSLOptions +StdEnvVars
	Options All MultiViews 

# correction for browsers that don't always handle SSL connections well
    SetEnvIf User-Agent ".*MSIE.*" 
    nokeepalive ssl-unclean-shutdown 
    downgrade-1.0 force-response-1.0
# Per-Server Logging:
# The home of a custom SSL log file. Use this when you want a
# compact non-error SSL logfile on a virtual host basis.
    CustomLog /var/log/httpd/ssl_request_log 
    "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"
</VirtualHost>
</IfModule> 
jlinker
Posts: 248
Joined: 2002-07-08 20:07
 

Re: Problem mit Apache + SSL und dem ausführen von CGIs

Post by jlinker »

Hast Du den cgi-script handler irgendwo global nochmal definiert, sonst fehlt der wohl auch noch in der 443 Definition.
teamwolf
Posts: 23
Joined: 2003-09-14 12:45
 

Re: Problem mit Apache + SSL und dem ausführen von CGIs

Post by teamwolf »

jlinker wrote:Hast Du den cgi-script handler irgendwo global nochmal definiert, sonst fehlt der wohl auch noch in der 443 Definition.

Code: Select all

   <Directory /Users/erik/Ordner/WebObjects/Info.woa/wa/Query> 
        SSLOptions +StdEnvVars 
        SetHandler cgi-script 
        Options All 
   </Directory> 
auch wenn ich das in die 443 Definition übernehme ändert das nichts. Es muss irgendwie einen anderen Grund geben. Ich verstehe das irgendwie gar nicht. Noch ne Idee ?? :?
jlinker
Posts: 248
Joined: 2002-07-08 20:07
 

Re: Problem mit Apache + SSL und dem ausführen von CGIs

Post by jlinker »

Momentan nicht - gibts irgendwelche Fehlermeldungen vom Browser, Logfiles??
teamwolf
Posts: 23
Joined: 2003-09-14 12:45
 

Re: Problem mit Apache + SSL und dem ausführen von CGIs

Post by teamwolf »

jlinker wrote:Momentan nicht - gibts irgendwelche Fehlermeldungen vom Browser, Logfiles??
in den Logs gibts nix zu lesen.
Der Browser sagt, dass er nicht zu der Seite verbinden kann. Richtig Timeout. Als wäre die Adresse nicht erreichbar. Ganz komische Kiste ...
Post Reply