LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-26-2009, 03:56 PM   #1
Sanford Stein
Member
 
Registered: Jun 2008
Location: Evanston, Illinois
Distribution: RHEL 6.4
Posts: 126

Rep: Reputation: 17
Apache 2 on RHEL


I have been asked to evaluate a product called Koha which seems to require an Apache installation which includes programs beginning with
"a2" (such as a2enmod and s2ensite), and which expects an /etc/apache2 file structure. My research tells me that this represents a standard Apache environment on Debian Linux, but my RHEL 5.3 environment is nothing like this.

Is it possible to install Apache 2 on RHEL so it looks like Debian?
Is it desirable to do so? Would it screw up my other applications?

Thanks,
Sanford Stein
 
Old 06-26-2009, 04:29 PM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Is that the library software? I searched the site and could not find a2enmod or a2ensite. So you must have some additional info somewhere.

I doubt very much that you have to. I think that if you are familiar with apache and read the manpages for a2.... on the web, you will understand what you have to do.


PS I'm not familiar with koha
 
Old 06-26-2009, 05:16 PM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
I downloaded a copy of koha.

In the top level directory after downloading is an installation instruction file for installing on fedora 7.

Note that RHEL5 is largely based on fedora 6, which suggests to me that if you were to use these instructions, you would probably be pretty close to having a working RHEL system.

Let us know what you think.
 
Old 06-26-2009, 05:48 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by Sanford Stein
... and which expects an /etc/apache2 file structure.
In addition to the other replies: you can satisfy this simply enough, if it really is a requirement.

Example:
Code:
# ln -s /etc/httpd /etc/apache2
(i.e. Make /etc/apach2 a symlink to /etc/httpd.)
 
Old 06-29-2009, 04:19 PM   #5
Sanford Stein
Member
 
Registered: Jun 2008
Location: Evanston, Illinois
Distribution: RHEL 6.4
Posts: 126

Original Poster
Rep: Reputation: 17
Thanks to everyone for their responses.

billymayday:
I see the file to which you are referring--it's about 20 pages long so I will need to read it, but it may circumvent the Apache problem. I will probably try the procedure later this week and let you know.

Wim:
The "a2..." programs are supposedly part of Apache 2, but they are not in my standard RHEL distribution. Yes, there are probably equivalent workarounds somewhere, but that seems like the hard way.

anomie:
Even if I do that link, the programs that I need (such as /etc/apache2/bin/a2enmod) are still not present on my distribution.
 
Old 06-29-2009, 11:36 PM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
To my knowledge, they are not part of apache. I run two Slackware (LAMP) servers and have never used those commands. I did check both a Slackware 10.1 server (apache 1.x) and a Slackware 12 server (apache 2.2.4) and they don't know the commands.

I've read somewhere that Slackware is known to be a very pure distro meaning that you get the original software as intended by the developers; so if Apache did not supply it, it will not be there. But I might be wrong.

Unfortunately, each distro seems to have its own approach with regards to apache. Slackware 12 uses a generic httpd.conf and in there it includes a number of files depending on the functionality that is required.

httpd.conf
Code:
...
...
# Virtual hosts
# WimS: uncommented this line so we can use virtual hosts
Include /etc/httpd/extra/httpd-vhosts.conf

# Local access to the Apache HTTP Server Manual
#Include /etc/httpd/extra/httpd-manual.conf

# Distributed authoring and versioning (WebDAV)
#Include /etc/httpd/extra/httpd-dav.conf

# Various default settings
#Include /etc/httpd/extra/httpd-default.conf

# Secure (SSL/TLS) connections
# WimS: enable ssl
Include /etc/httpd/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>

# Uncomment the following line to enable PHP:
#
# WimS: uncommented to enable PHP
Include /etc/httpd/mod_php.conf
...
...
The first bold line enables virtual hosting, the second bold line enables php.

As far as I understand it, a2ensite is used to add a 'virtual' host. Below is (part of) my (demo) configuration for virtual hosting on my Slackware 12 intranet server.

httpd-vhosts.conf
Code:
NameVirtualHost *:80

# catch-all
<VirtualHost *:80>
    ServerAdmin me@mydomain
    DocumentRoot /srv/httpd/htdocs
    ServerName btd-techweb02
</VirtualHost>

# site 1
<VirtualHost *:80>
    ServerAdmin me@mydomain
    DocumentRoot /home/wim/site1
    ServerName site1.btd-techweb02
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common

#WimS
# this is required to prevent message 403 "Forbidden"
    <Directory "/home/wim/site1">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

# site2
<VirtualHost *:80>
    ServerAdmin me@mydomain
    DocumentRoot /home/wim/site2
    ServerName site2.btd-techweb02
    ErrorLog /var/log/httpd/error_log
    CustomLog /var/log/httpd/access_log common

#WimS
# this is required to prevent message 403 "Forbidden"
    <Directory "/home/wim/site2">
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

# You can add more none secure sites here
Similar, a2enmod will enable a module and in the above httpd.conf you can see how Slackware approaches it for php.

mod_php.conf
Code:
#
# mod_php - PHP Hypertext Preprocessor module
#

# Load the PHP module:
LoadModule php5_module lib/httpd/modules/libphp5.so

# Tell Apache to feed all *.php files through PHP.  If you'd like to
# parse PHP embedded in files with different extensions, comment out
# this line and see the example below.
AddType application/x-httpd-php .php

# Tell Apache to feed all *.php, *.html, and *.htm files through
# the PHP module.  Add or subtract extensions here as desired.  Please
# note that running pages through PHP for no reason can be both slow
# and insecure, so be sure to know what you're doing.  It's a convenient
# shortcut, but probably isn't suitible for high-traffic sites if you
# write any of your pages in straight HTML.
#AddType application/x-httpd-php .php .html .htm

# This will display PHP files in colored syntax form.  Use with caution.
#AddType application/x-httpd-php-source .phps
I suggest that you check how RH approaches the apache configuration and take it from there.

If you run into problems, post the relevant instructions for koha and someone with RH experience might be able to tell you how it can be implemented on RH.

Note: instead of including httpd-vhosts.conf, one can put the content of httpd-vhosts.conf in httpd.conf. Disadvantage is that httpd.conf gets bigger for everything that you want to use (modules, virtual hosting, https etc) and therefore more difficult to maintain.

Last edited by Wim Sturkenboom; 06-29-2009 at 11:38 PM.
 
Old 07-02-2009, 03:45 PM   #7
Sanford Stein
Member
 
Registered: Jun 2008
Location: Evanston, Illinois
Distribution: RHEL 6.4
Posts: 126

Original Poster
Rep: Reputation: 17
Using the fedora-specific install instructions, the "a2" modules do not seem to be an issue and the configuration of Apache is straightforward.

I am still unable to get the product to install for Perl CPAN related reasons, but I will start another thread for that.

Wim, I appreciate your postings of the Slackware equivalents for
a2enmod and a2ensite. I'm sure this knowledge will be useful for other projects.

Thanks again to everybody,
SS
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache problem in RHEL 5.1 paulzhoucn Red Hat 3 02-12-2009 04:39 PM
Error istalling Apache on RHEL --->>>>> Rajaa Linux - Newbie 6 11-03-2008 09:47 AM
Can Apache 1.3/mod_perl 1.2 run under RHEL? austinke Red Hat 1 01-27-2008 01:09 PM
Apache doesn't start on RHEL 4.0 / PERL 5.8 roll_dom Linux - Software 2 06-29-2007 04:19 PM
Does the Apache version in RHEL ES 3.0 is consister in all releases? itsvasu Red Hat 1 09-16-2005 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration