WebMO Home Page
   Features
   Pro Features
   Enterprise Features
   Compare Features
   System Requirements
   Screen Shots
   Working Demo
   Support & Tutorials
   Support Forum
   Testimonials
   Revision History
   Mailing List
   Educational Resources
   Workshops
   License Info
   Pricing
   Buy WebMO Pro/Ent
   Obtain Free License
   Download
WebMO - Computational chemistry on the WWW
Recent news

WebMO 17.0 is now available for free download!

WebMO 17.0 Pro and Enterprise have a variety of additional features and is available for purchase.

The WebMO app is now available for iOS and Android.

September 21, 2017
Apache Web-Server Configuration Instructions

General Strategy

The following actions must be taken for WebMO to run cgi scripts written in perl under suexec:

  • Apache (or httpd), suexec, and perl must be installed
  • Web directories must be created and have the correct permissions
  • Apache must be configured to access ~/public_html directories
  • Apache must be configured to run cgi scripts in ~/public_html/cgi-bin
  • Apache must be restarted to recognize configuration changes
  • Optionally, a shortcut for ~/webmo can be made to point to the WebMO login page

Specific instructions are given for a variety of Linux distributions below.

CentOS 6 or 7
  • Disable SELinux
    # cd /etc/selinux
    # vi config
    change "SELINUX=enforcing" to "SELINUX=permissive"
    # setenforce 0
  • Install apache and perl
    # yum install httpd perl perl-CGI
  • Create directory structure within user account (/home/smith) and set permissions
    # su - smith
    $ cd ~
    $ chmod 711 ~
    $ mkdir public_html
    $ chmod 755 public_html
    $ cd public_html
    $ mkdir cgi-bin
    $ chmod 755 cgi-bin
    $ exit
  • Start apache (CentOS 6)
    # chkconfig --add httpd
    # service httpd start

    or start apache (CentOS 7)
    # systemctl enable httpd
    # systemctl start httpd
  • Edit /etc/httpd/conf/httpd.conf (CentOS 6) or /etc/httpd/conf.d/userdir.conf (CentOS 7)
    Comment out disabling of user directories:
    #UserDir disabled
    Uncomment the use of public_html:
    UserDir public_html
    Uncomment the entire <Directory /home/*/public_html> section (CentOS 6):
    <Directory /home/*/public_html>
    ...
    </Directory>

    Create an entry for cgi scripts within the user directories by adding the following at the end:
    <Directory /home/*/public_html/cgi-bin>
    Options +ExecCGI
    AddHandler cgi-script .cgi
    </Directory>

    Optionally, redirect access to /webmo to login page by adding the following at the end:
    RedirectMatch ^/webmo(()|/)$ /~smith/cgi-bin/webmo/login.cgi
  • Restart apache (CentOS 6)
    # service httpd restart
    or restart apache (CentOS 7)
    # systemctl restart httpd
Debian 7 or 8
  • Install apache, suexec, and perl
    # apt-get install apache2 apache2-suexec-custom libcgi-pm-perl
  • Create directory structure within user account (/home/smith) and set permissions
    # su - smith
    $ cd ~
    $ chmod 711 ~
    $ mkdir public_html
    $ chmod 755 public_html
    $ cd public_html
    $ mkdir cgi-bin
    $ chmod 755 cgi-bin
    $ exit
  • Start apache
    # a2enmod userdir
    # a2enmod suexec
    # a2enmod cgid
    (Debian 8)
    # service apache2 start
  • Edit /etc/apache2/conf.d/userdir.conf (Debian 7) or /etc/apache2/mods-available/userdir.conf (Debian 8)
    Verify that user directories are enabled:
    UserDir public_html
    UserDir disabled root

    Create an entry for cgi scripts within the user directories by adding the following at the end:
    <Directory /home/*/public_html/cgi-bin>
    Options +ExecCGI
    AddHandler cgi-script .cgi
    </Directory>

    Optionally, redirect access to /webmo to login page by adding the following at the end:
    RedirectMatch ^/webmo(()|/)$ /~smith/cgi-bin/webmo/login.cgi
  • Restart apache
    # service apache2 restart
Ubuntu
  • Install apache, suexec, and perl
    # apt-get install apache2 apache2-suexec-custom libcgi-pm-perl
  • Create directory structure within user account (/home/smith) and set permissions
    # su - smith
    $ cd ~
    $ chmod 711 ~
    $ mkdir public_html
    $ chmod 755 public_html
    $ cd public_html
    $ mkdir cgi-bin
    $ chmod 755 cgi-bin
    $ exit
  • Start apache
    # a2enmod userdir
    # a2enmod suexec
    # a2enmod cgid
    # service apache2 start
  • Edit /etc/apache2/mods-available/userdir.conf
    Verify that user directories are enabled:
    UserDir public_html
    UserDir disabled root

    Create an entry for cgi scripts within the user directories by adding the following at the end:
    <Directory /home/*/public_html/cgi-bin>
    Options +ExecCGI
    AddHandler cgi-script .cgi
    </Directory>

    Optionally, redirect access to /webmo to login page by adding the following at the end:
    RedirectMatch ^/webmo(()|/)$ /~smith/cgi-bin/webmo/login.cgi
  • Restart apache
    # service apache2 restart
SuSE 11
  • Install apache and perl
    Perform a normal installation, but add "Web and LAMP server"
  • Start apache
    # /sbin/chkconfig apache2 on
    # /sbin/service apache2 start
  • Edit /etc/apache2/mod_userdir.conf
    Verify that user directories are enabled:
    UserDir public_html
    UserDir disabled root

    Create an entry for cgi scripts within the user directories by adding the following at the end:
    <Directory /home/*/public_html/cgi-bin>
    Options +ExecCGI
    AddHandler cgi-script .cgi
    </Directory>

    Optionally, redirect access to /webmo to login page by adding the following at the end:
    RedirectMatch ^/webmo(()|/)$ /~smith/cgi-bin/webmo/login.cgi
  • Enable suexec2
    # chmod 4555 /usr/sbin/suexec2
  • Restart apache
    # /sbin/service apache2 restart
Copyright © 2016, WebMO, LLC, all rights reserved.