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

From Anarchopedia
Jump to: navigation, search
m (Reverted edits by Yrukiny (Talk) to last version by MrDog)
 
(2 intermediate revisions by 2 users not shown)
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>
+
   <VirtualHost LANGUAGE.anarchopedia.org>
 
         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
         &lt;Directory /&gt;
+
         <Directory />
 
                 Options FollowSymLinks
 
                 Options FollowSymLinks
 
                 AllowOverride None
 
                 AllowOverride None
         &lt;/Directory&gt;
+
         </Directory>
         &lt;Directory VHOSTROOT/langs/LANGUAGE&gt;
+
         <Directory VHOSTROOT/langs/LANGUAGE>
 
                 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/
         &lt;/Directory&gt;
+
         </Directory>
 
    
 
    
 
         ScriptAlias /cgi-bin/ VHOSTROOT/cgi-bin/LANGUAGE
 
         ScriptAlias /cgi-bin/ VHOSTROOT/cgi-bin/LANGUAGE
         &lt;Directory &quot;VHOSTROOT/cgi-bin/LANGUAGE&quot;&gt;
+
         <Directory "VHOSTROOT/cgi-bin/LANGUAGE">
 
                 AllowOverride None
 
                 AllowOverride None
 
                 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
 
                 Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
 
                 Order allow,deny
 
                 Order allow,deny
 
                 Allow from all
 
                 Allow from all
         &lt;/Directory&gt;
+
         </Directory>
 
    
 
    
 
         ErrorLog VHOSTROOT/logs/error-LANGUAGE.log
 
         ErrorLog VHOSTROOT/logs/error-LANGUAGE.log
Line 42: Line 42:
 
         ServerSignature On
 
         ServerSignature On
 
    
 
    
         Alias /icons/ &quot;/usr/share/apache2/icons/&quot;
+
         Alias /icons/ "/usr/share/apache2/icons/"
         &lt;Directory &quot;/usr/share/apache2/icons&quot;&gt;
+
         <Directory "/usr/share/apache2/icons">
 
             Options Indexes MultiViews
 
             Options Indexes MultiViews
 
             AllowOverride None
 
             AllowOverride None
 
             Order allow,deny
 
             Order allow,deny
 
             Allow from all
 
             Allow from all
         &lt;/Directory&gt;
+
         </Directory>
 
         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
         &lt;Files .*&gt;
+
         <Files .*>
 
                 Order Deny,Allow
 
                 Order Deny,Allow
 
                 Allow From All
 
                 Allow From All
         &lt;/Files&gt;
+
         </Files>
 
    
 
    
 
         # Allow rewriting URLs
 
         # Allow rewriting URLs
Line 78: Line 78:
 
         RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA]
 
         RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA]
 
    
 
    
   &lt;/VirtualHost&gt;
+
   </VirtualHost>
 
+
----
+
<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.

Latest revision as of 23:40, 3 April 2011

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

HTTPD configuration[edit]

 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>

Notes about rewrite rules[edit]

  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.