Installation
Aus mwcms.net
- Create a subdomain, e.g. "http://mediawiki.yourdomain.tld"
- Install MediaWiki (mediawiki.org)
- Rename "include/config.php-dist" to "include/config.php"
- Change "include/config.php" to your needs
- Rename "htaccess" to ".htaccess"
- OPTIONAL: Look at all "meta.xml" files in "navigation/"
- OPTIONAL: Create a new directory "navigation/example/"
- OPTIONAL: Create a new "meta.xml" files in "navigation/example/"
- OPTIONAL: See what happens if you change values in "navigation/example/meta.xml"
Note: mwCMS needs the MediaWiki in a (sub)domain. It is possible to install it in a subdirectory, but some features (like displaying images) might not work without changing the parser ("include/class_parser.php") and other PHP code.
However, on a very complex websites you should consider to rewrite the parser or some lines of it. You won't have to, but it won't hurt to take a look at the parser. The parser gives you complete control over your website. Read Customize mwCMS for further information.
If you want to install mwCMS on your local server, you might find the next chapter useful.
Creating a "local" subdomain
What is a "local" subdomain? Answer: A subdomain, which works only on your PC. I have installed XAMPP for Linux and will show now, how to create a local subdomain.
Edit "/etc/hosts" and add "127.0.0.1 mw.cvb". Afterwards your "hosts" should look like this:
# hosts This file describes a number of hostname-to-address # mappings for the TCP/IP subsystem. It is mostly # used at boot time, when no name servers are running. # On small systems, this file can be used instead of a # "named" name server. # Syntax: # # IP-Address Full-Qualified-Hostname Short-Hostname 127.0.0.1 localhost 192.168.0.50 mypc mypc 127.0.0.1 mw.cvb
Afterwards you should be able to "ping" your new subdomain:
mypc:~ # ping -c 2 mw.cvb PING mw.cvb (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.053 ms 64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.063 ms --- mw.cvb ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.053/0.058/0.063/0.005 ms
I created a new directory "/opt/lampp/etc/vhosts" and created my two VirtualHosts there:
mypc:/opt/lampp/etc/vhosts # more mw.cvb.conf
<VirtualHost 192.168.0.1:80>
ServerName mw.cvb
DocumentRoot /opt/lampp/htdocs/mediawiki-1.15.1
ErrorLog /opt/lampp/logs/error_log
CustomLog /opt/lampp/logs/access_log combined
<directory "/opt/lampp/htdocs/mediawiki-1.15.1">
Options +Indexes +Includes
</directory>
</VirtualHost>
and
mypc:/opt/lampp/etc/vhosts # more 192.168.0.1.conf
<VirtualHost 192.168.0.1:80>
ServerName 192.168.0.1
DocumentRoot /opt/lampp/htdocs
ErrorLog /opt/lampp/logs/error_log
CustomLog /opt/lampp/logs/access_log combined
<directory "/opt/lampp/htdocs">
Options +Indexes +Includes
</directory>
</VirtualHost>
In order to make it work, I had to change my "/opt/lampp/etc/httpd.conf":
# Listen: Allows you to bind Apache to specific IP addresses and/or # ports, instead of the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses. # #Listen 12.34.56.78:80 Listen 192.168.0.1:80 (...) # CVB 2009-12-22: NameVirtualHost = Listen NameVirtualHost 192.168.0.1:80 # XAMPP Include etc/extra/httpd-xampp.conf # CVB 2009-12-22: include VHOSTS Include etc/vhosts/*.conf
Otherwise you will get
[warn] _default_ VirtualHost overlap on port 80, the first has precedence
if you are trying to use more than one VirtualHost.
