• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

adding a new httpd.conf file to plesk

SudhirG

New Pleskian
I am using Plesk 10.2 with centOS 6.2 on my server.
I have a domain - www.openlx.com, which is working fine.
I have created, through plesk, as usual, a sub-domain koha.openlx.com, which is showing up fine.

Now, I installed Koha Library application and the whole process has been successful.
This generates its httpd.conf (/etc/koha/koha-httpd.conf) file which needs to be included in plesk, and that is where I am facing an issue.
The following commands, rquired by Koha were executed, with no errors :
export KOHA_CONF=/etc/koha/koha-conf.xml
export PERL5LIB=/var/www/vhosts/openlx.com/koha/lib


I created a link vhost.conf in the following directories :

/var/www/vhosts/openlx.com/conf
and
/var/www/vhosts/openlx.com/subdomain/koha/conf

and then gave the following command :
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain koha.openlx.com

there is no error, but the domain does not get added (the application is not visible, though on a linux server, without plesk, this is enough).

Then, I copied the /etc/koha/koha-httpd.conf, as vhost.conf file at the following locations :
/var/www/vhosts/openlx.com/conf
and
/var/www/vhosts/openlx.com/subdomain/koha/conf

and then gave the following command :
/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain koha.openlx.com

there is no error, but the domain does not get added (the application is not visible, though on a linux server, without plesk, this is enough).

I wonder what is the mistake that I need to correct.
Please help.
===========================

The /etc/koha/koha-httpd.conf has the following details :

# Koha Apache Configuration Directives

#NameVirtualHost *

## OPAC
<VirtualHost 173.193.109.146:80>
ServerAdmin [email protected]
DocumentRoot /var/www/vhosts/openlx.com/koha/opac/htdocs
## ServerName humanist.netshooter.com
ServerName koha.openlx.com
# ServerAlias opac.mydomain.com
ScriptAlias /cgi-bin/koha/ "/var/www/vhosts/openlx.com/koha/opac/cgi-bin/opac/"
ScriptAlias /index.html "/var/www/vhosts/openlx.com/koha/opac/cgi-bin/opac/opac-main.pl"
ScriptAlias /opac-search.pl "/var/www/vhosts/openlx.com/koha/opac/cgi-bin/opac/opac-search.pl"
ScriptAlias /search "/var/www/vhosts/openlx.com/koha/opac/cgi-bin/opac/opac-search.pl"
ErrorLog /var/log/koha/koha-opac-error_log
# CustomLog /var/log/koha/koha-opac-access_log combined
# TransferLog /var/log/koha/koha-opac-access_log
SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
SetEnv PERL5LIB "/var/www/vhosts/openlx.com/koha/lib"
SetEnv MEMCACHED_SERVERS ""
SetEnv MEMCACHED_NAMESPACE ""

<IfModule mod_gzip.c>
mod_gzip_on yes
mod_gzip_dechunk yes
mod_gzip_keep_workfiles No
mod_gzip_can_negotiate yes
mod_gzip_update_static No
mod_gzip_temp_dir /tmp
mod_gzip_minimum_file_size 512
mod_gzip_maximum_file_size 1000000
mod_gzip_maximum_inmem_size 1000000
mod_gzip_handle_methods GET POST
mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader Content-Type:image/*
mod_gzip_item_include file \.js$
mod_gzip_item_include mime ^application/javascript$
mod_gzip_item_include mime ^application/x-javascript$
mod_gzip_item_include file \.php$
mod_gzip_item_include mime ^text/html$
mod_gzip_item_include file \.css$
mod_gzip_item_include mime ^text/css$
</IfModule>

<IfModule mod_deflate.c>

# Compress content with type html, text, and css, ...
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript

DeflateCompressionLevel 9

# Properly handle old browsers that do not support compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio

LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
<IfModule mod_headers.c>
#properly handle requests coming from behind proxies
Header append Vary User-Agent
</IfModule>
</IfModule>


# Repeat this virtualhost stanza changing the following environment vars to
# create multiple OPAC interfaces with custom css and/or search limits:
# SetEnv OPAC_CSS_OVERRIDE mystyle.css
# SetEnv OPAC_SEARCH_LIMIT branch:CODE
# SetEnv OPAC_LIMIT_OVERRIDE 1

Options +FollowSymLinks

ErrorDocument 400 /cgi-bin/koha/errors/400.pl
ErrorDocument 401 /cgi-bin/koha/errors/401.pl
ErrorDocument 403 /cgi-bin/koha/errors/403.pl
ErrorDocument 404 /cgi-bin/koha/errors/404.pl
ErrorDocument 500 /cgi-bin/koha/errors/500.pl

# Rewrite Rules
RewriteEngine On

# Uncomment to turn on rewrite logging
# RewriteLog /var/log/koha/koha-opac-rewrite.log
# RewriteLogLevel 1
RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
RewriteRule (.+) $1?%1%2 [N,R,NE]

RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/opac-detail\.pl?bib=$1 [PT]
RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
</VirtualHost>

## Intranet
<VirtualHost 173.193.109.146:8080>
ServerAdmin [email protected]
DocumentRoot /var/www/vhosts/openlx.com/koha/intranet/htdocs
## ServerName humanist.netshooter.com:8080
ServerName koha.openlx.com:8080
# ServerAlias intranet.mydomain.com
ScriptAlias /cgi-bin/koha/ "/var/www/vhosts/openlx.com/koha/intranet/cgi-bin/"
ScriptAlias /index.html "/var/www/vhosts/openlx.com/koha/intranet/cgi-bin/mainpage.pl"
ScriptAlias /search "/var/www/vhosts/openlx.com/koha/intranet/cgi-bin/search.pl"
ErrorLog /var/log/koha/koha-error_log
# TransferLog /var/log/koha/koha-access_log
SetEnv KOHA_CONF "/etc/koha/koha-conf.xml"
SetEnv PERL5LIB "/var/www/vhosts/openlx.com/koha/lib"
SetEnv MEMCACHED_SERVERS ""
SetEnv MEMCACHED_NAMESPACE ""
Options +FollowSymLinks

ErrorDocument 400 /cgi-bin/koha/errors/400.pl
ErrorDocument 401 /cgi-bin/koha/errors/401.pl
ErrorDocument 403 /cgi-bin/koha/errors/403.pl
ErrorDocument 404 /cgi-bin/koha/errors/404.pl
ErrorDocument 500 /cgi-bin/koha/errors/500.pl

<IfModule mod_gzip.c>
mod_gzip_on yes
mod_gzip_dechunk yes
mod_gzip_keep_workfiles No
mod_gzip_can_negotiate yes
mod_gzip_update_static No
mod_gzip_temp_dir /tmp
mod_gzip_minimum_file_size 512
mod_gzip_maximum_file_size 1000000
mod_gzip_maximum_inmem_size 1000000
mod_gzip_handle_methods GET POST
mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader Content-Type:image/*
mod_gzip_item_include file \.js$
mod_gzip_item_include mime ^application/javascript$
mod_gzip_item_include mime ^application/x-javascript$
mod_gzip_item_include file \.php$
mod_gzip_item_include mime ^text/html$
mod_gzip_item_include file \.css$
mod_gzip_item_include mime ^text/css$
</IfModule>

<IfModule mod_deflate.c>

# Compress content with type html, text, and css, ...
AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript

DeflateCompressionLevel 9

# Properly handle old browsers that do not support compression
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

DeflateFilterNote Input instream
DeflateFilterNote Output outstream
DeflateFilterNote Ratio ratio

LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
<IfModule mod_headers.c>
#properly handle requests coming from behind proxies
Header append Vary User-Agent
</IfModule>
</IfModule>

RewriteEngine On
# Uncomment to turn on rewrite logging
# RewriteLog /var/log/koha/koha-intranet-rewrite.log
# RewriteLogLevel 1

RewriteCond %{QUERY_STRING} (.*?)(?:[A-Za-z0-9_-]+)=&(.*)
RewriteRule (.+) $1?%1%2 [N,R,NE]
RewriteRule ^/bib/([^\/]*)/?$ /cgi-bin/koha/detail\.pl?bib=$1 [PT]
RewriteRule ^/isbn/([^\/]*)/?$ /search?q=isbn:$1 [PT]
RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT]
</VirtualHost>
 
Back
Top