Difference between revisions of "PKP/OJS/Install Software/After"

From Libopedia
Jump to navigation Jump to search
m
Line 3: Line 3:
 
</center>
 
</center>
 
__TOC__
 
__TOC__
 +
 +
==Enable clean URLs without "index.php" - Not applicable to others==
 +
To force OJS to remove the "index.php" portion of all URLs, edit config.inc.php and set "restful_urls" to "On".
 +
sudo nano /var/www/config.inc.php
 +
'''OR'''
 +
sudo nano /var/www/html/config.inc.php
 +
 +
Then enable the "mod_rewrite" module;
 +
sudo a2enmod rewrite
 +
Then create the ".htaccess" file;
 +
sudo nano /var/www/.htaccess
 +
'''OR'''
 +
sudo nano /var/www/html/.htaccess
 +
Copy and paste the following;
 +
<pre>
 +
  <IfModule mod_rewrite.c>
 +
  RewriteEngine on
 +
  RewriteCond %{REQUEST_FILENAME} !-d
 +
  RewriteCond %{REQUEST_FILENAME} !-f
 +
  RewriteRule ^(.*)$ index.php/$1 [QSA,L]
 +
  </IfModule>
 +
</pre>
 +
 +
Save and exit the file.
 +
 +
Then update file ownership;
 +
sudo chown www-data.root /var/www/.htaccess
 +
'''OR'''
 +
sudo chown www-data.root /var/www/html/.htaccess
 +
 
==Enable Journal Proxy - Not applicable to others==
 
==Enable Journal Proxy - Not applicable to others==
 
;Setup Squid
 
;Setup Squid
Line 37: Line 67:
 
; proxy_password = password
 
; proxy_password = password
 
</pre>
 
</pre>
 
==Enable clean URLs without "index.php" - Not applicable to others==
 
To force OJS to remove the "index.php" portion of all URLs, edit config.inc.php and set "restful_urls" to "On".
 
sudo nano /var/www/config.inc.php
 
'''OR'''
 
sudo nano /var/www/html/config.inc.php
 
 
Then enable the "mod_rewrite" module;
 
sudo a2enmod rewrite
 
Then create the ".htaccess" file;
 
sudo nano /var/www/.htaccess
 
'''OR'''
 
sudo nano /var/www/html/.htaccess
 
Copy and paste the following;
 
<pre>
 
  <IfModule mod_rewrite.c>
 
  RewriteEngine on
 
  RewriteCond %{REQUEST_FILENAME} !-d
 
  RewriteCond %{REQUEST_FILENAME} !-f
 
  RewriteRule ^(.*)$ index.php/$1 [QSA,L]
 
  </IfModule>
 
</pre>
 
 
Save and exit the file.
 
 
Then update file ownership;
 
sudo chown www-data.root /var/www/.htaccess
 
'''OR'''
 
sudo chown www-data.root /var/www/html/.htaccess
 
  
 
==Restart the web server and lock down the config file==
 
==Restart the web server and lock down the config file==

Revision as of 16:51, 26 July 2016

Back to OJS Installation

Enable clean URLs without "index.php" - Not applicable to others

To force OJS to remove the "index.php" portion of all URLs, edit config.inc.php and set "restful_urls" to "On".

sudo nano /var/www/config.inc.php

OR

sudo nano /var/www/html/config.inc.php

Then enable the "mod_rewrite" module;

sudo a2enmod rewrite

Then create the ".htaccess" file;

sudo nano /var/www/.htaccess

OR

sudo nano /var/www/html/.htaccess

Copy and paste the following;

  <IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteRule ^(.*)$ index.php/$1 [QSA,L]
  </IfModule>

Save and exit the file.

Then update file ownership;

sudo chown www-data.root /var/www/.htaccess

OR

sudo chown www-data.root /var/www/html/.htaccess

Enable Journal Proxy - Not applicable to others

Setup Squid

Add the journal ip address to openjournals rule on the SQUID server on ez.sun.ac.za.

Ask Natasja/Wouter/Hilton to add this address using the web interface to ez.sun.ac.za.

Setup Ubuntu Server

Then do the following on the journal:

sudo nano /etc/environment

Add the following to the bottom of the file.

http_proxy=http://ez.sun.ac.za:3128/
https_proxy=http://ez.sun.ac.za:3128/
HTTP_PROXY=http://ez.sun.ac.za:3128/
HTTPS_PROXY=http://ez.sun.ac.za:3128/

Save and exit nano.

Setup OJS

Modify the config file and add the proxy settings. See example below.

;;;;;;;;;;;;;;;;;;
; Proxy Settings ;
;;;;;;;;;;;;;;;;;;

[proxy]

; Note that allow_url_fopen must be set to Off before these proxy settings
; will take effect.

; The HTTP proxy configuration to use
http_host = ez.sun.ac.za
http_port = 3128
; proxy_username = username
; proxy_password = password

Restart the web server and lock down the config file

Restart the Apache2 web server.

sudo service apache2 restart

Type the following to "lock-down" the OJS config file.

chmod 0644 /var/www/html/config.inc.php

Notes

We will be moving to a federated system. Below are links to pages regarding rewrites/redirection instructions for custom journal URL's.