Difference between revisions of "PKP/OJS/Install Software/After"
Jump to navigation
Jump to search
| Line 32: | Line 32: | ||
'''OR''' | '''OR''' | ||
sudo chown www-data.root /var/www/html/.htaccess | 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:53, 26 July 2016
Back to OJS Installation
Contents
Enable clean URLs without "index.php" - Optional
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
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.
- http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=3546
- http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=3546&start=15#p18816
- http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=7578
- http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=12175
- https://github.com/pkp/ojs/blob/master/docs/FAQ
- http://stackoverflow.com/questions/18934304/mod-rewrite-to-get-rid-of-index-php