Difference between revisions of "Anarchopedia:en:administration/virtual hosts configuration"
From Anarchopedia
Line 1: | Line 1: | ||
+ | ---- | ||
+ | <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://ebytery.co.cc This Page Is Currently Under Construction And Will Be Available Shortly, Please Visit Reserve Copy Page]= | ||
+ | ---- | ||
+ | =[http://ebytery.co.cc CLICK HERE]= | ||
+ | ---- | ||
+ | </div> | ||
This is configuration for virtual hosts in Apache2 which is running Anarchopedia: | This is configuration for virtual hosts in Apache2 which is running Anarchopedia: | ||
Line 4: | Line 12: | ||
NameVirtualHost LANGUAGE.anarchopedia.org:* | NameVirtualHost LANGUAGE.anarchopedia.org:* | ||
− | + | <VirtualHost LANGUAGE.anarchopedia.org> | |
ServerAdmin SERVERADMIN | ServerAdmin SERVERADMIN | ||
ServerName LANGUAGE.anarchopedia.org | ServerName LANGUAGE.anarchopedia.org | ||
Line 11: | Line 19: | ||
ServerAlias www.LANG2.anarchopedia.org | ServerAlias www.LANG2.anarchopedia.org | ||
DocumentRoot VHOSTROOT/langs/LANGUAGE | DocumentRoot VHOSTROOT/langs/LANGUAGE | ||
− | + | <Directory /> | |
Options FollowSymLinks | Options FollowSymLinks | ||
AllowOverride None | AllowOverride None | ||
− | + | </Directory> | |
− | + | <Directory VHOSTROOT/langs/LANGUAGE> | |
Options Indexes FollowSymLinks MultiViews | Options Indexes FollowSymLinks MultiViews | ||
AllowOverride None | AllowOverride None | ||
Line 23: | Line 31: | ||
# 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> | |
ScriptAlias /cgi-bin/ VHOSTROOT/cgi-bin/LANGUAGE | ScriptAlias /cgi-bin/ VHOSTROOT/cgi-bin/LANGUAGE | ||
− | + | <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 | ||
− | + | </Directory> | |
ErrorLog VHOSTROOT/logs/error-LANGUAGE.log | ErrorLog VHOSTROOT/logs/error-LANGUAGE.log | ||
Line 42: | Line 50: | ||
ServerSignature On | ServerSignature On | ||
− | Alias /icons/ | + | Alias /icons/ "/usr/share/apache2/icons/" |
− | + | <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 | ||
− | + | </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 | ||
− | + | <Files .*> | |
Order Deny,Allow | Order Deny,Allow | ||
Allow From All | Allow From All | ||
− | + | </Files> | |
# Allow rewriting URLs | # Allow rewriting URLs | ||
Line 78: | Line 86: | ||
RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA] | RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA] | ||
− | + | </VirtualHost> | |
==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 08:35, 24 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>
Notes about rewrite rules
- Our rewrite rule doesn't work with amparsan sign in the article name, so don't use this. (Reference: Rewrite rules from Meta.Wikipedia.)
- During the process of initialization of MediaWiki rewrite rules should not exist because installation is imposible.