Line 174: |
Line 174: |
| | | |
| </pre> | | </pre> |
| + | |
| + | |
| + | |
| + | |
| + | this is the original template based in SME7 |
| + | |
| + | cat /etc/e-smith/templates/etc/httpd/conf/httpd.conf/95mediawiki |
| + | |
| + | #------------------------------------------------------------ |
| + | # Mediawiki |
| + | #------------------------------------------------------------ |
| + | Alias /mediawiki /opt/mediawiki |
| + | Alias /wiki /opt/mediawiki/index.php |
| + | |
| + | <Directory /opt/mediawiki> |
| + | { |
| + | my $mwsec = $mediawiki{'HTTPS'} || "off"; |
| + | if ($mwsec eq "off") |
| + | { |
| + | $OUT .= " # SSLRequireSSL on"; |
| + | } else { |
| + | $OUT .= " SSLRequireSSL on"; |
| + | } |
| + | } |
| + | AddType application/x-httpd-php .php .php3 .phtml |
| + | Options FollowSymLinks |
| + | order deny,allow |
| + | { |
| + | my $mwiki = $mediawiki{'PublicAccess'} || "local"; |
| + | if ($mwiki eq "local") |
| + | { |
| + | $OUT .= " deny from all\n"; |
| + | $OUT .= " allow from $localAccess"; |
| + | } else { |
| + | $OUT .= " allow from all"; |
| + | } |
| + | } |
| + | php_flag register_globals off |
| + | php_admin_value open_basedir /opt/mediawiki/:/tmp/ |
| + | </Directory> |
| + | |
| + | <Directory /opt/mediawiki/includes> |
| + | order deny,allow |
| + | { |
| + | my $mwiki = $mediawiki{'PublicAccess'} || "local"; |
| + | if ($mwiki eq "local") |
| + | { |
| + | $OUT .= " deny from all\n"; |
| + | $OUT .= " allow from $localAccess"; |
| + | } else { |
| + | $OUT .= " allow from all"; |
| + | } |
| + | } |
| + | </Directory> |
| + | |
| + | <Directory /opt/mediawiki/languages> |
| + | order deny,allow |
| + | { |
| + | my $mwiki = $mediawiki{'PublicAccess'} || "local"; |
| + | if ($mwiki eq "local") |
| + | { |
| + | $OUT .= " deny from all\n"; |
| + | $OUT .= " allow from $localAccess"; |
| + | } else { |
| + | $OUT .= " allow from all"; |
| + | } |
| + | } |
| + | </Directory> |
| + | |
| + | <Directory /opt/mediawiki/maintenance> |
| + | order deny,allow |
| + | { |
| + | my $mwiki = $mediawiki{'PublicAccess'} || "local"; |
| + | if ($mwiki eq "local") |
| + | { |
| + | $OUT .= " deny from all\n"; |
| + | $OUT .= " allow from $localAccess"; |
| + | } else { |
| + | $OUT .= " allow from all"; |
| + | } |
| + | } |
| + | </Directory> |
| + | |
| + | <Directory /opt/mediawiki/math> |
| + | order deny,allow |
| + | { |
| + | my $mwiki = $mediawiki{'PublicAccess'} || "local"; |
| + | if ($mwiki eq "local") |
| + | { |
| + | $OUT .= " deny from all\n"; |
| + | $OUT .= " allow from $localAccess"; |
| + | } else { |
| + | $OUT .= " allow from all"; |
| + | } |
| + | } |
| + | </Directory> |
| + | |
| + | <Directory /opt/mediawiki/tests> |
| + | order deny,allow |
| + | { |
| + | my $mwiki = $mediawiki{'PublicAccess'} || "local"; |
| + | if ($mwiki eq "local") |
| + | { |
| + | $OUT .= " deny from all\n"; |
| + | $OUT .= " allow from $localAccess"; |
| + | } else { |
| + | $OUT .= " allow from all"; |
| + | } |
| + | } |
| + | </Directory> |
| + | |
| + | <Directory /opt/mediawiki/maintenance/archives> |
| + | order deny,allow |
| + | { |
| + | my $mwiki = $mediawiki{'PublicAccess'} || "local"; |
| + | if ($mwiki eq "local") |
| + | { |
| + | $OUT .= " deny from all\n"; |
| + | $OUT .= " allow from $localAccess"; |
| + | } else { |
| + | $OUT .= " allow from all"; |
| + | } |
| + | } |
| + | </Directory> |
| + | |
| + | <Directory /opt/mediawiki/serialized> |
| + | order deny,allow |
| + | { |
| + | my $mwiki = $mediawiki{'PublicAccess'} || "local"; |
| + | if ($mwiki eq "local") |
| + | { |
| + | $OUT .= " deny from all\n"; |
| + | $OUT .= " allow from $localAccess"; |
| + | } else { |
| + | $OUT .= " allow from all"; |
| + | } |
| + | } |
| + | </Directory> |
| + | |
| + | |
| + | <Directory /opt/mediawiki/t> |
| + | order deny,allow |
| + | { |
| + | my $mwiki = $mediawiki{'PublicAccess'} || "local"; |
| + | if ($mwiki eq "local") |
| + | { |
| + | $OUT .= " deny from all\n"; |
| + | $OUT .= " allow from $localAccess"; |
| + | } else { |
| + | $OUT .= " allow from all"; |
| + | } |
| + | } |
| + | </Directory> |
| + | |
| + | #------------------------------------------------------------ |