apache_logoApache Web Server maybe one of such popular server application and those are so many articles describes an implementation how to &  Apache Web Server tutorial on openSUSE. Even with so many tutorial regarding Apache and virtual host on openSUSE, I’m going to mad for about 2 days finding why Apache virtual host doesn’t work as it should be.

The problem maybe related to my  fault but I don’t want any openSUSE fans going to be mad for about a days only for setup Virtual Host on openSUSE :-) . Another reason why I writing the tutorial is because I must preparing a good tutorial for Indonesian openSUSE monthly meeting next Saturday.

Tutorial will be divided into 3 part. Initial part is about Apache installation and simple setup to make “it Works !”. The second part will describe about virtual host setup using text configuration and the third part will describe graphical method, an implementation of YAST2 Web Server for setting up Apache and virtual host. Let’s move on the part 1 : Installing and simple configuration



Installation using  YAST

  1. Open YAST | Software | Software Management
  2. Change the Filter choice from Search to  Patterns
    setting web
  3. Scroll down the option and choose Server Functions
  4. Thick down  Web and LAMP Server
  5. Click Accept and follow the installation wizard

Installation using Konsole/Terminal

  1. Open Konsole / Terminal (ALT+F2, konsole)
  2. Run the following command:
  3. zypper in -t pattern lamp_server

Simple Configuration

Running the Service

  1. Open YAST | System | System Services (Runlevel)
  2. Find the service name :  Apache2
  3. Click  start and Enable
  4. we would also activating and running the service using konsole by running this command from konsole :
  5. chkconfig --add apache2
    chkconfig apache2 on
    service apache2 restart

Activating Index File

For security reason, openSUSE disabling unindexed folder. If we try to browse the folder without index.html, it will shocked us with error message “Access Forbidden”. We may add the index file (e.g : index.php) into Apache configuration or change the index behaviouras describe below  :

  1. Open file /etc/apache2/server-default.conf
  2. Go to the position of DocumentRoot  configuration (see below)
  3. #
    # Configure the DocumentRoot
    <Directory "/srv/www/htdocs">
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs-2.2/mod/core.html#options
    # for more information.
    Options None
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    AllowOverride None
    # Controls who can get stuff from this server.
    Order allow,deny
    Allow from all
  4. Change Options None into Options All. We may also using another option (Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews). Please refer to http://httpd.apache.org/docs-2.2/mod/core.html#options for further information
  5. Restart Apache
  6. service apache2 restart

Testing the Web Server

  1. Open your browser
  2. Type this address : http://ip-address-web-server or http://hostname or http://localhost (The last option will only be used on your local computer). Contoh : atau http://vavai.vavai.com
  3. If you get the nice information It Works! then you passed the first part of Apache setting :-)


  1. openSUSE used /srv/www/htdocs as default home folder
  2. Apache configuration could be found at /etc/apache2
  3. If you used Firewall, make an exceptin for port 80 unless you used another port. Port  80 is a standar port for Apache Web Server

9 Thoughts on “Apache Web Server & Virtual Host on openSUSE : Part 1

  1. Any reason to not use “yast2 http-server”?

  2. Masim "Vavai" Sugianto on February 24, 2009 at 20:23 said:


    No, I don’t have any reason. Actually, I’ll be discuss about yast2 http-server usage at Part 3 of this article series.

  3. nervien on February 24, 2009 at 22:29 said:

    any days ago ,i read a page on planet suse
    how,after a soft install with yast2 ,let the page open
    it was a good trick
    i have lost the trick
    any idea how i find this page in the archives from planet suse?
    best regards from belgium

  4. Pingback: Apache Web Server & Virtual Host on openSUSE : Part 2 | Spirit of Change

  5. Pingback: openSUSE-ID : Regular Meeting #14 Summary Report | Spirit of Change

  6. Pingback: Boycott Novell » Novell News Summary - Part I: New OpenSUSE is Fichte; A Little SLE* News

  7. Pingback: Tutorial : Samba PDC + OpenLDAP on openSUSE 11.1 – Part 3 | Spirit of Change

  8. RAFAEL on March 20, 2010 at 16:31 said:

    with local host or my ipaddress it works! but why not with the domainname I ve created?

  9. Pingback: Apache2 on openSUSE 12.x: some notes « The Wiert Corner – irregular stream of stuff

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Post Navigation