OJS Her Dergi İçin Ayrı Domain Tanımlama


I don't know how many people understood the above discussion and could actually implement "Individual Domain name for each journal within one OJS installation". I undertook following steps and one can actually setup the server in 10 mins:

1. Register additional multiple domain names and set up A record to point to your server where OJS is installed, say http://www.myjournalservice.com. (with and without www)

2. Go to myjournalservice.com admin and create additional journals with journal path MYJOURNAL1, MYJOURNAL2 etc. (we will use http://www.myjournal1.com & http://www.myjournal2.com to access these journals)

3. Edit your httpd.conf to add virtual hosts:

CODE: SELECT ALL
<VirtualHost YOUR_IP_ADDRESS:80>
    ServerName myjournal1.com
    ServerAlias www.myjournal1.com
    DocumentRoot /home/MYJOURNALSERVICE/public_html
    ServerAdmin webmaster@myjournalservice.com
    ## User publizer # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup MYJOURNALSERVICE MYJOURNALSERVICE
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup MYJOURNALSERVICE MYJOURNALSERVICE
    </IfModule>
    CustomLog /usr/local/apache/domlogs/myjournalservice.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/myjournalservice.com combined
    Options -ExecCGI -Includes
</VirtualHost>

<VirtualHost YOUR_IP_ADDRESS:80>
    ServerName myjournal2.com
    ServerAlias www.myjournal2.com
    DocumentRoot /home/MYJOURNALSERVICE/public_html
    ServerAdmin webmaster@myjournalservice.com
    ## User publizer # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup MYJOURNALSERVICE MYJOURNALSERVICE
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup MYJOURNALSERVICE MYJOURNALSERVICE
    </IfModule>
    CustomLog /usr/local/apache/domlogs/myjournalservice.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/myjournalservice.com combined
    Options -ExecCGI -Includes
</VirtualHost>


Replace "MYJOURNALSERVICE" with the cPanel username of the account on which OJS is installed and set up the correct DocumentRoot above.

Restart Apache Web Server


4. Edit config.inc.php of the OJS and set base_url

CODE: SELECT ALL
; The canonical URL to the OJS installation (excluding the trailing slash)
;base_url = "http://www.myjournalservice.com" (Leave this commented)

base_url[MYJOURNAL1] = http://myjournal1.com (do not use www)
base_url[MYJOURNAL2] = http://myjournal2.com


5. Edit .htaccess file for OJS and set the following content:

CODE: SELECT ALL
RewriteEngine On
RewriteBase /

# Check for and remove "www" if necessary
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

# Use this set of 3 lines for each of your journals
RewriteCond %{SERVER_NAME} ^myjournal1.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/MYJOURNAL1/$1 [L]

# Use this set of 3 lines for each of your journals
RewriteCond %{SERVER_NAME} ^myjournal2.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/MYJOURNAL2/$1 [L]

# Use this set of 3 lines to allow access to the main site
RewriteCond %{SERVER_NAME} ^myjournalservice.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/index/$1 [L]



..and you are done :) 

Yorumlar

  1. very Good article. But if you need OJS Installation, just visit our website https://sch.com.pk/journal-website-hosting for service by experts.

    YanıtlaSil

Yorum Gönder

Bu blogdaki popüler yayınlar

Asp.Net ile Mernisten veri Çekme