Difference between revisions of "Anarchopedia:en:administration/virtual hosts configuration"

From Anarchopedia
Jump to: navigation, search
m (HTTPD configuration)
Line 1: Line 1:
 
This is configuration for virtual hosts in Apache2 which is running Anarchopedia:
 
This is configuration for virtual hosts in Apache2 which is running Anarchopedia:
  
==HTTPD configuration==
+
>==HTTPD configuration==
  
 
   NameVirtualHost LANGUAGE.anarchopedia.org:*
 
   NameVirtualHost LANGUAGE.anarchopedia.org:*
   <VirtualHost LANGUAGE.anarchopedia.org>
+
   &lt;VirtualHost LANGUAGE.anarchopedia.org&gt;
 
         ServerAdmin SERVERADMIN
 
         ServerAdmin SERVERADMIN
 
         ServerName LANGUAGE.anarchopedia.org
 
         ServerName LANGUAGE.anarchopedia.org
Line 11: Line 11:
 
         ServerAlias www.LANG2.anarchopedia.org
 
         ServerAlias www.LANG2.anarchopedia.org
 
         DocumentRoot VHOSTROOT/langs/LANGUAGE
 
         DocumentRoot VHOSTROOT/langs/LANGUAGE
         <Directory />
+
         &lt;Directory /&gt;
 
                 Options FollowSymLinks
 
                 Options FollowSymLinks
 
                 AllowOverride None
 
                 AllowOverride None
         </Directory>
+
         &lt;/Directory&gt;
         <Directory VHOSTROOT/langs/LANGUAGE>
+
         &lt;Directory VHOSTROOT/langs/LANGUAGE&gt;
 
                 Options Indexes FollowSymLinks MultiViews
 
                 Options Indexes FollowSymLinks MultiViews
 
                 AllowOverride None
 
                 AllowOverride None
Line 23: Line 23:
 
                 # in /apache2-default/, but still have / go to the right place
 
                 # in /apache2-default/, but still have / go to the right place
 
                 # RedirectMatch ^/$ /apache2-default/
 
                 # RedirectMatch ^/$ /apache2-default/
         </Directory>
+
         &lt;/Directory&gt;
 
    
 
    
 
         ScriptAlias /cgi-bin/ VHOSTROOT/cgi-bin/LANGUAGE
 
         ScriptAlias /cgi-bin/ VHOSTROOT/cgi-bin/LANGUAGE
         <Directory "VHOSTROOT/cgi-bin/LANGUAGE">
+
         &lt;Directory &quot;VHOSTROOT/cgi-bin/LANGUAGE&quot;&gt;
 
                 AllowOverride None
 
                 AllowOverride None
 
                 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
 
                 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
 
                 Order allow,deny
 
                 Order allow,deny
 
                 Allow from all
 
                 Allow from all
         </Directory>
+
         &lt;/Directory&gt;
 
    
 
    
 
         ErrorLog VHOSTROOT/logs/error-LANGUAGE.log
 
         ErrorLog VHOSTROOT/logs/error-LANGUAGE.log
Line 42: Line 42:
 
         ServerSignature On
 
         ServerSignature On
 
    
 
    
         Alias /icons/ "/usr/share/apache2/icons/"
+
         Alias /icons/ &quot;/usr/share/apache2/icons/&quot;
         <Directory "/usr/share/apache2/icons">
+
         &lt;Directory &quot;/usr/share/apache2/icons&quot;&gt;
 
             Options Indexes MultiViews
 
             Options Indexes MultiViews
 
             AllowOverride None
 
             AllowOverride None
 
             Order allow,deny
 
             Order allow,deny
 
             Allow from all
 
             Allow from all
         </Directory>
+
         &lt;/Directory&gt;
 
         php_value include_path .:./include:VHOSTROOT/include:VHOSTROOT/phplib:VHOSTROOT/include/LANGUAGE:VHOSTROOT/phplib/LANGUAGE:VHOSTROOT/langs/LANGUAGE/include
 
         php_value include_path .:./include:VHOSTROOT/include:VHOSTROOT/phplib:VHOSTROOT/include/LANGUAGE:VHOSTROOT/phplib/LANGUAGE:VHOSTROOT/langs/LANGUAGE/include
         <Files .*>
+
         &lt;Files .*&gt;
 
                 Order Deny,Allow
 
                 Order Deny,Allow
 
                 Allow From All
 
                 Allow From All
         </Files>
+
         &lt;/Files&gt;
 
    
 
    
 
         # Allow rewriting URLs
 
         # Allow rewriting URLs
Line 78: Line 78:
 
         RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA]
 
         RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA]
 
    
 
    
   </VirtualHost>
+
   &lt;/VirtualHost&gt;
 +
 
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://ykosyqopu.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 +
----
 +
=[http://ykosyqopu.co.cc CLICK HERE]=
 +
----
 +
</div>
  
 
==Notes about rewrite rules==
 
==Notes about rewrite rules==
 
#Our rewrite rule doesn't work with amparsan sign in the article name, so don't use this. (Reference: [http://meta.wikipedia.org/wiki/Rewrite_Rules#httpd.conf Rewrite rules from Meta.Wikipedia].)
 
#Our rewrite rule doesn't work with amparsan sign in the article name, so don't use this. (Reference: [http://meta.wikipedia.org/wiki/Rewrite_Rules#httpd.conf Rewrite rules from Meta.Wikipedia].)
 
#During the process of initialization of MediaWiki rewrite rules should not exist because installation is imposible.
 
#During the process of initialization of MediaWiki rewrite rules should not exist because installation is imposible.

Revision as of 05:20, 18 November 2010

This is configuration for virtual hosts in Apache2 which is running Anarchopedia:

>==HTTPD configuration==

 NameVirtualHost LANGUAGE.anarchopedia.org:*
 <VirtualHost LANGUAGE.anarchopedia.org>
       ServerAdmin SERVERADMIN
       ServerName LANGUAGE.anarchopedia.org
       ServerAlias www.LANGUAGE.anarchopedia.org
       ServerAlias LANG2.anarchopedia.org
       ServerAlias www.LANG2.anarchopedia.org
       DocumentRoot VHOSTROOT/langs/LANGUAGE
       <Directory />
               Options FollowSymLinks
               AllowOverride None
       </Directory>
       <Directory VHOSTROOT/langs/LANGUAGE>
               Options Indexes FollowSymLinks MultiViews
               AllowOverride None
               Order allow,deny
               allow from all
               # This directive allows us to have apache2's default start page
               # in /apache2-default/, but still have / go to the right place
               # RedirectMatch ^/$ /apache2-default/
       </Directory>
 
       ScriptAlias /cgi-bin/ VHOSTROOT/cgi-bin/LANGUAGE
       <Directory "VHOSTROOT/cgi-bin/LANGUAGE">
               AllowOverride None
               Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
               Order allow,deny
               Allow from all
       </Directory>
 
       ErrorLog VHOSTROOT/logs/error-LANGUAGE.log
 
       # Possible values include: debug, info, notice, warn, error, crit,
       # alert, emerg.
       LogLevel warn
 
       CustomLog VHOSTROOT/logs/access-LANGUAGE.log combined
       ServerSignature On
 
       Alias /icons/ "/usr/share/apache2/icons/"
       <Directory "/usr/share/apache2/icons">
           Options Indexes MultiViews
           AllowOverride None
           Order allow,deny
           Allow from all
       </Directory>
       php_value include_path .:./include:VHOSTROOT/include:VHOSTROOT/phplib:VHOSTROOT/include/LANGUAGE:VHOSTROOT/phplib/LANGUAGE:VHOSTROOT/langs/LANGUAGE/include
       <Files .*>
               Order Deny,Allow
               Allow From All
       </Files>
 
       # Allow rewriting URLs
       RewriteEngine on
 
       # The following rules are only for backwards compatibility
       # (so that old links to your site keep working). You should leave them out in a new install.
       # Redirect old /wiki/ urls
       RewriteRule ^/wiki/(.*)$ http://LANGUAGE.anarchopedia.org/$1 [R,L]
       # Redirect old /wiki.phtml?title= and index.php urls
       RewriteRule ^/wiki\.phtml\?title=(.*)$ http://LANGUAGE.anarchopedia.org/$1 [R,L]
       RewriteRule ^/index.php\?title=(.*)$ http://LANGUAGE.anarchopedia.org/$1 [R,L]
       RewriteRule ^/index.php/(.*)$ http://LANGUAGE.anarchopedia.org/$1 [R,L]
       # end backward compatibility rules, the following ones are important
 
       # Don't rewrite requests for files in MediaWiki subdirectories,
       # MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
       RewriteCond %{REQUEST_URI} !^/(stylesheets|images|skins)/
       RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
       RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
       RewriteCond %{REQUEST_URI} !^/favicon.ico
       RewriteCond %{REQUEST_URI} !^/robots.txt
 
       RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA]
 
 </VirtualHost>


Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page


CLICK HERE


Notes about rewrite rules

  1. Our rewrite rule doesn't work with amparsan sign in the article name, so don't use this. (Reference: Rewrite rules from Meta.Wikipedia.)
  2. During the process of initialization of MediaWiki rewrite rules should not exist because installation is imposible.