Home English Mozilla  Tuesday, May 7 01:23:52 
MyNews
Print

 Home
 MyCMS

 Screenshots
 Demo
 Downloads

 News RSS 2.0
 RSS
Documentation
 Roadmap

 Templates
 Themes
 Internationalization

 Maintainer
 Web repositories
 CVS

 NeoSystem
 Wcal

  
Search
  1. Requirements
  2. Apache configuration
  3. MyNews virtual host
  4. MyNews user authentication
    1. PostgreSQL
    2. MySQL
  5. Install procedure
The mynews script needs to be installed before installing the mynews-www interface. See Step 2 for more information.

Then you need to install a webserver to run the MyNews web interface. Generally, you will use Apache that comes with any Linux distribution. You can get more information about installing and configuring Apache at:

Additionally, you have to use one of the apache modules to perform user authentication with the DBMS you have choosen for your MyNews server (mod_auth_pgsql for PostgreSQL and mod_auth_mysql for MySQL). You can get more information about installing and configuring mod_auth_... at:
Three options must be activated in the Apache configuration for MyNews web interface to work properly:
  • Indexes : to allow Apache to access to index script
  • ExecCGI : to allow Apache to execute mynews-www cgi scripts
  • AllowOverride : to allow Apache to read .htaccess file to perform user authetication
For example, if you decide to store mynews-www interface in the default web directory (/var/www/mynews), you will have something like this in your Apache configuration:
<Directory /var/www/mynews>
    Options Indexes ExecCGI
    AllowOverride All
</Directory>
By default, Apache will be configured to be accessed by the URL http://localhost. In order to access your MyNews server from everywhere (local network or Internet), it is recommended to create a virtual host for MyNews. It means a name known from the DNS that will be used to access your MyNews local site.

For example, if you own a domainname called my.domain, you can choose mynews.my.domain for the public name of your MyNews website. In that case, you have to configure your domain DNS entries to redirect mynews.my.domain to your Apache server.

Then you will define a virtual host in the Apache configuration to handle requests that begin with http://mynews.my.domain.... This is generally done in a special file called Vhosts.conf in the vhosts subdirectory of the Apache configuration directory. In that file, you will write something like:

<VirtualHost 192.168.0.1>
    ServerName mynews.my.domain
    ServerPath /
    DocumentRoot /var/www/mynews/
</VirtualHost>
192.168.0.1 must be replaced by the IP address of your Apache server in the local network.
User authentication will be performed in MyNews using the appropriate mod_auth apache module. Two distinct directories are protected by a login/password:
  • /var/www/mynews : restricted to any valid MyNews users
  • /var/www/mynews/admin : restricted to admin users only
The installation will create two .htaccess files:
  • /var/www/mynews/.htaccess
  • /var/www/mynews/admin/.htaccess
The syntax of the directives used in these files will depend on which DBMS you have choosen for your MyNews server:

PostgreSQL

AuthName "MyNews"
AuthType Basic
Auth_PG_host localhost
Auth_PG_port 5432
Auth_PG_user mynews
Auth_PG_database mynews
Auth_PG_pwd_table mnuser
Auth_PG_grp_table mnusergroup
Auth_PG_uid_field login
Auth_PG_gid_field groupid
Auth_PG_pwd_field password
<LIMIT GET POST>
Require valid-user
</LIMIT>
For /var/www/mynews/admin/.htaccess, the line:
Require valid-user
will be replaced by:
Require group admin
Attention: The syntax of mod_auth_pgsql has changed in the 2.0 version (dedicated to apache2). You will have to replace:
Auth_PG_gid_field groupid
by:
Auth_PG_grp_group_field groupid
You also have to add the line:
Auth_PG_grp_user_field login

MySQL

AuthName "MyNews"
AuthType Basic
AuthGroupFile /dev/null
AuthMySQLHost localhost
AuthMySQLUser root
AuthMySQLDB mynews
AuthMySQLUserTable mnuser
AuthMySQLGroupTable mnusergroup
AuthMySQLNameField login
AuthMySQLGroupField groupid
AuthMySQLPasswordField password
<LIMIT GET POST>
Require valid-user
</LIMIT>
The installation of the mynews-www interface is very simple. After extracting the mynews-www archive package, goto the package directory and run:
> perl Makefile.PL
> make
> make test
> make install
During installation you will have to configure some parameters. Generally, you will choose the default value.
Conf dir [/etc]:
The directory used to install the mynews.conf configuration file. If you don't want to use the default value (/etc), you will have to set the MNCONF environment variable to use the right configuration file. For example, if your configuration file is /home/mynews/conf/mynews.conf, you must add this line to your Apache configuration:
SetEnv MNCONF /home/mynews/conf/mynews.conf
Public website URL (optional) []:
The complete URL of the optional MyNews public website.
Public website directory (optional) [/var/www/mynewspub]:
The directory used to install the MyNews public website. If you define a public website, don't forget to define the corresponding virtual host in your Apache configuration. For example:
<VirtualHost 192.168.0.1>
    ServerName mynewspub.my.domain
    ServerPath /
    DocumentRoot /var/www/mynewspub/
</VirtualHost>


© 2004 Joël Savignon