wok-stable rev 3618
ajaxterm: remove rewrite, use javascript redirect instead
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jun 30 18:10:05 2009 +0200 (2009-06-30) |
parents | 94863a7d1610 |
children | 10dc77ee3ab6 |
files | ajaxterm/receipt ajaxterm/stuff/usr/share/ajaxterm/ajaxterm.html |
line diff
1.1 --- a/ajaxterm/receipt Tue Jun 30 15:57:04 2009 +0200 1.2 +++ b/ajaxterm/receipt Tue Jun 30 18:10:05 2009 +0200 1.3 @@ -27,8 +27,6 @@ 1.4 's/RUN_DAEMONS="/RUN_DAEMONS="ajaxterm /' $1/etc/rcS.conf 1.5 # Configure lighttpd server 1.6 if [ -f $1/usr/lib/lighttpd/mod_proxy.so ]; then 1.7 -#https://www.dupnet.org/dotclear/index.php/2007/10/07/11-ajaxterm-et-lighttpd 1.8 -#http://www.lighttpd.net 1.9 grep -q mod_proxy $1/etc/lighttpd/lighttpd.conf || 1.10 cat >> $1/etc/lighttpd/lighttpd.conf <<EOT 1.11 server.modules += ( "mod_proxy" ) 1.12 @@ -39,18 +37,6 @@ 1.13 ( ( "host" => "127.0.0.1", "port" => 8022 ) ) 1.14 ) 1.15 EOT 1.16 - grep -q mod_redirect $1/etc/lighttpd/lighttpd.conf || 1.17 - cat >> $1/etc/lighttpd/lighttpd.conf <<EOT 1.18 -server.modules += ( "mod_redirect" ) 1.19 -EOT 1.20 - grep -q https:// $1/etc/lighttpd/lighttpd.conf && 1.21 - cat >> $1/etc/lighttpd/lighttpd.conf <<EOT 1.22 -\$SERVER["socket"] == ":80" { 1.23 - \$HTTP["host"] =~ "(.*)" { 1.24 - url.redirect = ( "^/ajaxterm" => "https://%1/ajaxterm/" ) 1.25 - } 1.26 -} 1.27 -EOT 1.28 if [ -z "$1" ]; then 1.29 # Start Web server. 1.30 /etc/init.d/lighttpd stop 1.31 @@ -59,7 +45,6 @@ 1.32 fi 1.33 # Configure apache server 1.34 if [ -f $1/etc/apache/httpd.conf ]; then 1.35 -#http://smhteam.info/wiki/index.linux.php5?wiki=AjaxTerm 1.36 if [ ! -f $1/etc/apache/conf.d/ajaxterm ]; then 1.37 cat > $1/etc/apache/conf.d/ajaxterm <<EOT 1.38 <IfModule mod_proxy.c> 1.39 @@ -71,14 +56,6 @@ 1.40 ProxyPass /ajaxterm/ http://localhost:8022/ 1.41 ProxyPassReverse /ajaxterm/ http://localhost:8022/ 1.42 </IfModule> 1.43 - 1.44 -<LocationMatch ^/ajaxterm> 1.45 - <IfModule mod_rewrite.c> 1.46 - RewriteEngine On 1.47 - RewriteCond %{HTTPS} off 1.48 - RewriteRule ^.*$ https://%{SERVER_NAME}/ajaxterm/ [L,R=303] 1.49 - </IfModule> 1.50 -</LocationMatch> 1.51 EOT 1.52 if [ -z "$1" ]; then 1.53 # Start Web server.
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/ajaxterm/stuff/usr/share/ajaxterm/ajaxterm.html Tue Jun 30 18:10:05 2009 +0200 2.3 @@ -0,0 +1,24 @@ 2.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2.5 +<html> 2.6 +<head> 2.7 + <title>Ajaxterm</title> 2.8 + <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> 2.9 + <link rel="stylesheet" type="text/css" href="ajaxterm.css"/> 2.10 + <script type="text/javascript" src="sarissa.js"></script> 2.11 + <script type="text/javascript" src="sarissa_dhtml.js"></script> 2.12 + <script type="text/javascript" src="ajaxterm.js"></script> 2.13 + <script type="text/javascript"> 2.14 + window.onload=function() { 2.15 + if (location.protocol=='https:') { 2.16 + t=ajaxterm.Terminal("term",80,25); 2.17 + } 2.18 + else { 2.19 + location.href='https://'+location.hostname+location.pathname; 2.20 + } 2.21 + }; 2.22 + </script> 2.23 +</head> 2.24 +<body> 2.25 +<div id="term"></div> 2.26 +</body> 2.27 +</html>