Apache setting on OpenSUSE
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    This discussion was created from comments split from: Problems with password.
    Post edited by Andrey Podshivalov at 2013-02-11 12:26:08
  • 20 Comments sorted by
  • Hello all.  Trying (again*&$%!!) to set-up newscoop on my own server. According to install info on wiki I should create a dir /var/www/sites-available and a file /var/www/sites-available/newscoop-4.0 for the 'virtual host' config to verify with installation. Command given once the virtual host file see:
    code:
    <VirtualHost *:80>
    DocumentRoot /var/www/newscoop-4.0/newscoop
    ServerName localhost
    ServerAdmin foo@bar.org

    <Directory /var/www/newscoop-4.0/newscoop>
    DirectoryIndex index.php
    AllowOverride all
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>

    Once this file is created wiki says to issue command: a2dissite, a2ensite,, etc...
    I *do not* have any of these 3 commands on openSUSE 12.2, nor have I ever encountered them
    in the past. Anyone familiar w/set-up on openSUSE??? I'm neither a coder nor a web-admin;
    just an average guy seeking to set-up a server w/website that I control directly.
    Thanks for reading. Have A Healthy, Prosperous Day!!
    ---rob

    Have A Healthy, Prosperous Day!
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    you need to put file newscoop.conf (not newscoop-4.0) into /etc/apache2/vhosts.d instead of /var/www/sites-available. After then restart apache server.

    see opensuse manual: http://doc.opensuse.org/documentation/html/openSUSE/opensuse-reference/cha.apache2.html

  • Thx for quick response. In what directory should I find newscoop.conf?? I don't show it on my system. Part of my confusion comes from not having step-to-step info for my distro. In install instructions at sourcefabric and wiki ubuntu and debian are favorites, so I'm trying this out as I go along. I do however, get the "It Works" when I navigate to my apache server. Command:
    #sudo find / -name newscoop.conf comes up empty!! Take Care!
    ---rob
    Have A Healthy, Prosperous Day!
    Have A Healthy, Prosperous Day!
  • Vote Up0Vote Down Andrey PodshivalovAndrey Podshivalov
    Posts: 1,526Member, Administrator, Sourcefabric Team
    remove all existing conf files:
    sudo rm /etc/apache2/vhosts.d/*.conf
    start nano editor:
    sudo nano /etc/apache2/vhosts.d/newscoop.conf
    put into editor the text:
    <VirtualHost *:80>
    DocumentRoot /var/www/newscoop-4.0/newscoop
    ServerName localhost
    ServerAdmin foo@bar.org

    <Directory /var/www/newscoop-4.0/newscoop>
    DirectoryIndex index.php
    AllowOverride all
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>
    restart apache server

  • OK, Thanks!  Now what is next step; attempt to access gives: "Access Forbidden" ....
    "You don't have permission to access the requested object.
    It is either read-protected or not readable by the server.



    "   However, per openSuSE manual permission *are* set to wwwrun:www
    No clue here... I would study some programming/etc., but it is *very, very* hard not to find info, but info that is 'do this 1, then do this 2', etc.  Instead, most info is overwhelming because there isn't these steps. I learned to parachute from planes in steps....didn't get to see cockpit till long after was qualified to jump. But C, C++, etc. Html, mysql, etc. is all at once. Oh well!
    Thx again. I don't want to give up. Must have a site for myself and friends so to give our 0.2c
    ---rob
    Have A Healthy, Prosperous Day!
  • A little clarification.  But first: I really appreciate your time & interest. Newscoop installed on <server>; I have net and physical access, <server> runs in my basement for keep cool, and avoid noise. <server> unit is older Compaq DL-580 w/ 4 scsi disks; approx. 60-80GB avail after openSUSE 12.2install. Net connect is 12mbps/down 2mbps/up. Think this is sufficient for initial traffic, maybe 6mos-to-1 year. I am attempt to install/admin newscoop site from <desktop> located upper floor, OS also openSUSE 12.2. Have mysql (but 'lookout') recently read that openSUSE will migrate to MariaDB soon!!  That will be madness for me; I don't have mysql figured out yet!  Anyway, <server> is *not* facing global 'net yet for simply reasons: 1. Need admin/install/setup skills; and 2. Content not yet available. 3. Currently plan on 1 newscoop site only.
    HTH when you giving advice, so you know what I'm trying to do here. Thanks again. Take Care!
    ---rob
    Have A Healthy, Prosperous Day!
  • MariaDB = Mysql at this time, all works with mariaDB well.

    I use opensuse servers and newscopp, working.


    Maybe this helps...


    Copy this configs to /etc/apache2/vhost.d/[yourfilename].conf

    <VirtualHost *>
     DocumentRoot /srv/www/htdocs/[yourpath]
     ServerName [your server name]
     ServerAlias [your server alias]
     ServerAdmin webmaster@[your server name]
     <Directory /srv/www/htdocs/[yourpath]>
      AllowOverride None
      Order allow,deny
      Allow from all

      DirectoryIndex index.php index.html
      Options -Indexes FollowSymLinks -MultiViews

      AddType video/ogg .ogm
      AddType video/ogg .ogv
      AddType audio/ogg .ogg
      AddType video/mp4 .mp4
      AddType video/webm .webm

      # Options might not allowed here, use Rewrite rules instead
      <IfModule mod_rewrite.c>
        RewriteEngine On

        #redirect urls to index
        RewriteCond %{REQUEST_URI} /+get_img$
        RewriteRule . get_img.php [L]

        RewriteCond %{REQUEST_URI} /+attachment/+
        RewriteRule . attachment.php [L]

        RewriteCond %{REQUEST_URI} /+images/+cache
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule . index.php [L]

        RewriteCond %{REQUEST_URI} ^/+js
        RewriteRule . - [L]

        RewriteCond %{REQUEST_URI} ^/+robots\.txt
        RewriteRule . - [L]

        RewriteCond %{REQUEST_URI} !\.php$
        RewriteCond %{REQUEST_URI} !\.html$
        RewriteCond %{REQUEST_URI} !\.css$
        RewriteCond %{REQUEST_URI} !\.js$
        RewriteCond %{REQUEST_URI} !\.ico$
        RewriteCond %{REQUEST_URI} !/+admin
        RewriteCond %{REQUEST_URI} !/+install
        RewriteCond %{REQUEST_URI} !(/+plugins/[^/]*)?/+js
        RewriteCond %{REQUEST_URI} !(/+plugins/[^/]*)?/+css
        RewriteCond %{REQUEST_URI} !(/+plugins/[^/]*)?/+images
        RewriteCond %{REQUEST_URI} !/+themes
        RewriteCond %{REQUEST_URI} !/+videos
        RewriteCond %{REQUEST_URI} !/+pdf
        RewriteCond %{REQUEST_URI} !/+images/+cache
        RewriteRule . index.php [L]

        RewriteCond %{REQUEST_URI} .tpl$
        RewriteRule . index.php [L]

        RewriteCond %{REQUEST_URI} /+admin$|/+admin/+.*|/+admin-files
        RewriteRule . admin.php [L]
      </IfModule>
     </Directory>
    </VirtualHost>


    Copy campsite files to folder /srv/www/htdocs/[yourpath]
    modify owner and group ro wwwrun:www for all files with next command
    chmod wwwrun:www -R /srv/www/htdocs/[yourpath]

    Modify /etc/sysconfig/apache2 files first config line to somthing like:

    APACHE_MODULES="authz_host actions alias auth_basic authz_groupfile authn_file authz_user dir env expires log_config mime setenvif deflate logio rewrite ssl authz_default php5"

    You nead php5 package to be enabled.

    And restart apache:
    rcapache2 restart

    if everything OK, start install newscoop from your browser...
    Post edited by Zsolt Baji at 2013-02-11 10:50:55
  • OK .. .. .. I will try by starting over again. The 1st time I installed newscoop, I did not do any 'virtualhost' configuration.  I do not want to try virtualization at this time.
    I've followed the above steps anyway, and now I cannot even get apache to run at all! Error msg:
    [code]
    /etc/init.d/apache2 start returned 1 (unspecified error): 
    </pre></p
    [code]
    So I'm stuck again, and have not an idea what is wrong.  Previously, when I navigated to server I got the standard "It Works!" from openSUSE apache install.  Any advice greatly appreciated.
    Thanks, all.  Have A Healthy, Prosperous Day!
    ---robert
    Have A Healthy, Prosperous Day!
  • Ok, I did fresh install of openSUSE 12.2, created mysql db w/mysql_secure_install to configure root for mysql, created newscoop db w/user + password, reloaded (flushed) privileges.  Then created /etc/apache2/vhosts.d/newscoop.conf, verified via mysql that newscoop db exits, verified newscoop user exists, etc., etc., etc.  Now this error when attempt to reload/restart apache2:

    [code]:

    systemctl status apache2.service
    apache2.service - apache
    Loaded: loaded (/lib/systemd/system/apache2.service; enabled)
    Active: failed (Result: exit-code) since Fri, 22 Feb 2013 14:59:08 -0500; 8min ago
    Process: 5619 ExecStop=/usr/sbin/httpd2 -D SYSTEMD -k stop (code=exited, status=1/FAILURE)
    Process: 8817 ExecStart=/usr/sbin/start_apache2 -D SYSTEMD -k start (code=exited, status=1/FAILURE)
    Main PID: 5276 (code=exited, status=0/SUCCESS)
    CGroup: name=systemd:/system/apache2.service

    [code] <end>

    I'm doing my best to follow the above instructions, am lost again!  Any help please??

    Have A Healthy, Prosperous Day!!

    ---robert


    Have A Healthy, Prosperous Day!
  • OK ... I've reached the install/admin page which asks for mysql db user/password , etc. php5-APC is working and so is mod_rewrite!!  I double-checked the mysql user + db password on cli, it works!

    But...when I use same user/password on page 3 or 4 of install sequence I get this error:

    "Error: Database parameters invalid. Could not connect to database server."

    Any clue or advice greatly appreciated!

    ---rob


    Have A Healthy, Prosperous Day!
  • [SOLVED!]:  Update --- When asked for ServerName/address, user/password, mysql port:3306, etc. I entered the actual name of my servername/hostname.  This gives above "ERROR: Database parameters invalid. Could not connect to database server."  However, when give *exact* same info, but change/leave ServerName='localhost' I am allowed to proceed to next page(s).  Whew!  Where is Sherlock Holmes when I need him?  Also, FWIW on openSUSE, apache simply will not work unless user/group combo is:  wwwrun:www (of course also with rwx privileges). Hope this info helps someone else using openSUSE!  Thanks.  Have A Healthy, Prosperous Day!
    ---robert
    Have A Healthy, Prosperous Day!
  • Hey Robert, hey Zsolt !!

    This is a very useful thread, we will create a page in the Newscoop wiki based on this discussion here, so that other users can benefit of a clear guide/howto. I will send the link to you guys so that you can contribute, it would be very much appreciated.

    All Best,
  • Hi Holman!  Thank you very much, and good to hear from you.  I'd be honored to contribute in any way the members think worthwhile.  I only have two reservations:  (a) I'm not a prgrammer, and (b)  I have two (2 each) teenagers!  : ]   Aside from this, I am very interested in the feature set I've discovered in Newscoop.  I can see that many are benefitting from them, and some who have to be concerned about censorship, etc.  That makes Newscoop very attractive.  The Airtime (radio) section will no doubt play a big role sometime later.  I truly believe in the right of the common man to exercise the capacity to communicate his/her ideas without interference from politicians and so on.
    Look forward to hearing from you soon.  I am in US (time zone = GMT -5).  Take Care.
    Have A Healthy, Prosperous Day!
    ---robert
    Have A Healthy, Prosperous Day!
  • @admins:  If thread need to be moved please notify me so I can follow....thanks.
    Well, from start from 'scratch' default openSUSE 12.2 install, with apache2, mysql, newscoop, etc. Finally, some sucess!  See here: "Newscoop sucessfully installed, click 'Administrator' icon to start newscoop.  But then I get:  "Error: The site alias '192.168.X.X' was not assigned to a publication.
    Please create a publication and assign it the current site alias." 
    NOTE:  Yes, I have been reading *all* the forum posts about this error, the Newscoop 4.1.0 manual (Section 7, page 28 --"Create Publication", and the install info) which is how I got this far.  But, what the manual *doesn't say* is that in order to 'create first publication', one must first be logged in as admin.   Can this be recovered from command line, or??  With the above error no allowing admin to login, I am in a continous loop.  I'm trying to keep it simple:  Have 1 and only one server, newscoop instance, *no* 'virtual hosts', etc. so as to remove confusion.  Apache2 default install is working, mysql is OK;  both passwords verified at command line.  Modules in apache2 = rewrite, php5, alias, cache, auth_basic, and many others.  Advice or info from this point welcome.  Thank you.  Have A Healthy, Prosperous Day!!  ----robert





    Have A Healthy, Prosperous Day!
  • @Andrey P.  I copied your suggested newscoop.conf file from above ---  nothing; doesn't work for me. Still stuck with "Error: The site alias '192.168.1.67' was not assigned to a publication.
    Please create a publication and assign it the current site alias."  Did 'chown' wwwrun:www to satisfy owner:group dependency for openSUSE, still not working.  Well, I'll be here until I figure it out.  I have not found a CMS that offers the promise of structures newspaper-model publishing + audio/visual on the scale of newscoop.  I just don't want to be converted into a coder/programmer.  Want to focus on content.  Have the devs thought about making scripts & installs for the major linux distros??  Anyone with root/admin  access to their own system could then simply install and go!!  Tired now.  Just don't see how to 'create publication' if can't get in!!
    Take Care.  Have A Healthy, Prosperous Day!   ---- robert
    Have A Healthy, Prosperous Day!
  • Hello anyone?  Although I'm unable to create a publication in fresh install of v 4.1.0 (ERROR: did not assign publication, etc., etc.) I am able to login to the server with phpMyAdmin.  Would this help me to solve the problem??  Thanks.  Have A Healthy, Prosperous Day!!  ---robert
    Have A Healthy, Prosperous Day!
  • Hi Robert,

    I am a bit lost now with all the work you have put on this, awesome by the way.

    So, you are getting this error: Error: The site alias '192.168.1.67' was not assigned to a publication.

    ... but that usually happens only when you try to access front-end pages, have you tried to access the admin interface via:

    http://192.168.1.67/admin

    You should be able to see the login form and after using the credentials you set during installation you should be able to login. Then there you can setup the publication alias as you already read on the manual.

    Apologies if you already tried this.

    We are starting today to test Newscoop on OpenSUSE and together to your findings we will provide some sort of guide on how to get it running (if at all possible ;-)


    All Best,


  • Hi Holman, thanks for getting back to this.  Yes!  Did *exactly* try to login with your method.  No Go!  I also tried 192.168.1.67/index.php, etc., etc.  There are a few things going on here: 1.  I'm new at this.  2.  openSUSE is directory structure, a 'little different' than many distros (i.e., debian, ubuntu, red hat)  3. Apache config files are all over the map;  not like Xwindow with *one config file*  with [Section: Monitor], [Section...], etc.  4. On openSUSE, many admin duties are expected to go through YaST config manager, which works fine for all.  But, when using YaST on apache, many tasks are logged and YaST reports that any manual config changes  may be lost!  Also, some changes needed to install CMS such as newscoop (ex.:  virtual host) *must* be done manually.  So if one is new to CMS and/or apache, well...try --- try -- again. In any event, thank all for taking up this issue and testing on openSUSE.  I'm will to be 'tester' maybe 2 days per week if that will help.  Thanks again.  Have A Healthy, Prosperous Day!!  ---- robert

    Have A Healthy, Prosperous Day!
  • @Holman:  One last thing:  SUSE is used pretty heavily in the EU (Headquarters in Nuremberg) *and* several cities have adopted it (Munich) wholesale.  So....I doubt the install guide efforts would be wasted.  Take Care.  ---- robert
    Have A Healthy, Prosperous Day!
  • Hello Robert,
    I'm using openSUSE 12.2 and if you open up firefox, you have a posibility to go the bookmarks toolbar
    (goto top left  you will see "View" then choose "toolbars" and then check or "switch" on "bookmarks toolbar".

    After you have "switched on the bookmarks toolbar, you should see a blue folder named openSUSE, with a small downwards pointing arrow.

    Click on the arrow, and in the drop down menu  choose " openSUSE Download"
    This will bring you into openSUSE  package search.

    Type newscoop,
    and a warning will pop up saying "show unstable packages."

    Click on the phrase  "show unstable packages" and another warning window pops up with the warning"







    :) :) :)
    Haec Libertatis Ergo
    (this, because of freedom)