CGI and SSL

Discussion in 'Installation/Configuration' started by R0yk3, Nov 22, 2009.

  1. R0yk3

    R0yk3 New Member

  2. falko

    falko Super Moderator ISPConfig Developer

    Can you post the vhost configurations of the non-SSL and the SSL vhosts?
     
  3. R0yk3

    R0yk3 New Member

    A n00b question.
    where can i find these? debian installation.
    /etc/apache/
    or
    /root/ispconfig/
     
  4. R0yk3

    R0yk3 New Member

    Found it:
    Code:
    <VirtualHost 194.145.200.181:80>
    ServerName test.sieliakus.nl:80
    ServerAdmin 
    DocumentRoot /var/www/web5/web
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    Alias  /cgi-bin/ /var/www/web5/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    ErrorLog /var/www/web5/log/error.log
    Alias /stats "/var/www/web5/web/webalizer"
    Alias /error/ "/var/www/web5/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web5/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web5/user/$1/web/$3
    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
      RewriteRule .* - [F]
    </IfModule>
    </VirtualHost>
    
    Nothing about SSL here, But furtherone i found this:

    Code:
    <IfModule mod_ssl.c>
    <VirtualHost 194.145.200.181:443>
    ServerName www.sieliakus.nl:443
    ServerAdmin 
    DocumentRoot /var/www/web4/web
    ServerAlias sieliakus.nl ftp.sieliakus.nl
    DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
    ErrorLog /var/www/web4/log/error.log
    AddType application/x-httpd-php .php .php3 .php4 .php5
    php_admin_flag safe_mode Off
    SSLEngine on
    SSLCertificateFile /var/www/web4/ssl/www.sieliakus.nl.crt
    SSLCertificateKeyFile /var/www/web4/ssl/www.sieliakus.nl.key
    Alias /stats "/var/www/web4/web/webalizer"
    Alias /error/ "/var/www/web4/web/error/"
    ErrorDocument 400 /error/invalidSyntax.html
    ErrorDocument 401 /error/authorizationRequired.html
    ErrorDocument 403 /error/forbidden.html
    ErrorDocument 404 /error/fileNotFound.html
    ErrorDocument 405 /error/methodNotAllowed.html
    ErrorDocument 500 /error/internalServerError.html
    ErrorDocument 503 /error/overloaded.html
    AliasMatch ^/~([^/]+)(/(.*))? /var/www/web4/user/$1/web/$3
    AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web4/user/$1/web/$3
    RewriteEngine on
    RewriteCond %{HTTP_HOST}   ^ftp\.sieliakus\.nl [NC]
    RewriteRule   ^/(.*)$  https://www.sieliakus.nl/ftp$1  [R]
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
    <IfModule mod_rewrite.c>
      RewriteEngine on
      RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
      RewriteRule .* - [F]
    </IfModule>
    
    do i copy the above part, and replace www with test?
     
  5. R0yk3

    R0yk3 New Member

    i found also this at:apache2/sites-available/default-ssl

    Code:
    <IfModule mod_ssl.c>
    <VirtualHost _default_:443>
    	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>
    and default:
    Code:
    <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>
    
     
  6. falko

    falko Super Moderator ISPConfig Developer

    I think the problem is that
    Code:
    Alias  /cgi-bin/ /var/www/web5/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    is missing in the SSL vhost. Can you add this manually, restart Apache and see if CGI is working then for the SSL vhost?
     
  7. R0yk3

    R0yk3 New Member

    That did it.. :D

    But do i need to ad this for every site i create? where i want the cgi in SSL?
     
  8. R0yk3

    R0yk3 New Member

    It worked for 15 minutes? then the file was restored in its original state?????
     
  9. falko

    falko Super Moderator ISPConfig Developer

    This should usually be written by ISPConfig. Did you maybe modify the function make_vhost() in /root/ispconfig/scripts/lib/config.lib.php?
     
  10. R0yk3

    R0yk3 New Member

    Nope,

    i really can not imagine why i want to do that. I learned don't touch only watch this way you cannot break things :p

    no serious i did not make changes there.
    And i does not change back anymore. i made the changes also at the ~ file. now they are here to stay.
     

Share This Page