Results 1 to 7 of 7

Thread: Custom Apache Installation

  1. #1

    Default Custom Apache Installation

    i am a newbie to linux and this community. i have recently installed linux (OpenSuse 11.2) on my server. i am trying to install a third party web application, which requires Apache with Suexec in custom configuration. the web application requires the 'docroot' in Suexec to be set to '/home' instead of '/srv/www'. thus, i need to install Apache manualy and cannot use 'YaST' to do so, due to custom configuration required. i found some methods on other forums, but they were for not specifically for OpenSuse. on following the instructions/commands, none of the errors were generated, but apache is still not installed on my server.

    here is the commands i ran to install apache
    -----------------------------------------------
    download httpd-2.2.10.tar.gz via
    wget URL TO Downloadfile
    tar xfz [filename]

    Now do the rest:

    IMPORTANT: When you type in --with-suexec-docroot=/home \ watch out to use /home


    ./configure --with-suexec-caller=wwwrun \
    --with-suexec-docroot=/home \
    --with-suexec-gidmin=96 \
    --with-suexec-uidmin=96 \
    --with-suexec-logfile=/var/log/apache2/suexec.log
    make all
    cd support
    make suexec
    cp suexec /usr/sbin/suexec2
    cd /usr/sbin/
    chown root:root suexec2
    chmod u+s suexec2
    rcapache2 restart
    -----------------------------------------------

    please let me know how to install Apache + Suexec with custom configuration OR tell me if there is any error(s) in the above commands in context of OpenSuse.

  2. #2
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    851

    Default Re: Custom Apache Installation

    What's the name of the third party application? Someone here has probably experienced it, and it'll probably be simpler to modify a few things on that application and a standard Opensuse LAMP stack to get it working. Or better yet, the third party app may be available as an RPM, ready to install on Opensuse.

    Opensuse does such a good job looking after Apache that I much prefer installing it via Yast.

    Provide a few more details and maybe someone has run up against your situation and will walk you right through it.

  3. #3

    Default Re: Custom Apache Installation

    the application i am trying to install is webmin & virtualmin. webmin is the main system, and virtualmin is an add-on module in this application.

    virtualmin allows you to create multiple virtual servers on your physical server. in order to do so it needs suexec root to be set to "/home" instead of "/srv/www/" (which is default in OpenSuse). i have researched on various forums and virtualmin needs apache to be setup in such configuration to work properly.

    thus, help me install apache with suexec support with mentioned customization.

  4. #4

    Default Re: Custom Apache Installation

    Grab the src.rpm install with rpm -ivh navigate to /usr/src/packages/SPECS open up the apache spec file modify the line around the 440ish mark. You could do the global var, but I'm not sure of the implications sounded bad idea to me.

    Hit it with rpmbuild -bb file.spec

    Solve all the dependencies, you'll have a few devel libs and need some of the build tools. Wait a while then install the rpms in /usr/src/packages/RPMS/$arch/ hit it with a wildcard I went for zypper in *

    Code:
    /usr/sbin/suexec2 -V
     -D AP_DOC_ROOT="/home"
     -D AP_GID_MIN=96
     -D AP_HTTPD_USER="wwwrun"
     -D AP_LOG_EXEC="/var/log/apache2/suexec.log"
     -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
     -D AP_UID_MIN=96
     -D AP_USERDIR_SUFFIX="public_html"
    Hopefully this is what your after in the end...
    Man first, have a try at Info, have a look at Wiki, if all that fails Scroogle!!!!!
    If I've helped click on the Rep button I don't know what it does but it sounds cool.

  5. #5
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Custom Apache Installation

    Quote Originally Posted by iCode83 View Post
    here is the commands i ran to install apache
    -----------------------------------------------
    download httpd-2.2.10.tar.gz via
    wget URL TO Downloadfile
    tar xfz [filename]

    Now do the rest:

    IMPORTANT: When you type in --with-suexec-docroot=/home \ watch out to use /home


    ./configure --with-suexec-caller=wwwrun \
    --with-suexec-docroot=/home \
    --with-suexec-gidmin=96 \
    --with-suexec-uidmin=96 \
    --with-suexec-logfile=/var/log/apache2/suexec.log
    make all
    cd support
    make suexec
    cp suexec /usr/sbin/suexec2
    cd /usr/sbin/
    chown root:root suexec2
    chmod u+s suexec2
    rcapache2 restart
    -----------------------------------------------

    please let me know how to install Apache + Suexec with custom configuration OR tell me if there is any error(s) in the above commands in context of OpenSuse.
    Well I haven't seen this howto but some steps seem to be missing. I don't see the compiled apache2 installed anywhere, it should also be a cp command. I don't know what the significance of 96 is, perhaps you should find out what uidmin and gidmin do before using it without question.

    You would also encounter other issues, such as checking that modules (like PHP) are compatible with the generated binary.

    Perhaps it would be better to take FeatherMonkey's advice and rebuild the standard RPM with your changes so that it would slot in the normal apache locations.

  6. #6

    Default Re: Custom Apache Installation

    thank you all for your inputs. i tried another method and it seems to work. here is what i did :
    1) as i already had compiled binary of suexec from the commands i executed, i copied that binary to a temp folder.
    2) installed apache using YaST
    3) replaced new suexec binary with the one that i compiled (from temp folder)

    tell me if this method would have any future implications?

  7. #7
    Join Date
    Oct 2008
    Location
    Birmingham. AL
    Posts
    851

    Default Re: Custom Apache Installation

    FYI, I use Webmin with Opensuse all the time on my servers. I've never used Virtualmin, so I can't speak to that.

    You'll have a few conflicts -- in particular, if you use Webmin to set up the firewall, Yast's firewall configurator will complain afterwards when you start it -- but aside from that and a few other annoyances, they can coexist.

    I would always use Yast to install software, though. That way, it keeps track of updates and patches for you.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •