Running Apache under Open Suse

I have been running an Ubuntu Web Server. A friend convinced me to come over to Open Suse. I have open Suse 11.4 setup. I have installed Apache 2 for use for the Web Server like I had before. I need to get it to start now when I boot the server which I haven’t been able to figure out how to get it to do that. Also want to get Proftp going. I tried to download Webmin and could not find it with Software Manager. Any help with this appreciated.

Mike Hughes

On Wed, 09 Nov 2011 19:56:10 +0000, macmikeal wrote:

> I have been running an Ubuntu Web Server. A friend convinced me to come
> over to Open Suse. I have open Suse 11.4 setup. I have installed Apache
> 2 for use for the Web Server like I had before. I need to get it to
> start now when I boot the server which I haven’t been able to figure out
> how to get it to do that. Also want to get Proftp going. I tried to
> download Webmin and could not find it with Software Manager. Any help
> with this appreciated.

Have a look at YaST - specifically, the runlevel editor will get you
started on automatically starting services.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

To add to Jim’s post:

Install yast-http-server through the software installer. Now (re)start Yast and you will see a new module in Network services to configure the apache server. In Yast - System - Runlevel editor set apache to start at boot. Opening 127.0.0.1 in a browser should show “It works !!”.
If your webserver should be a LAMP server, select the pattern view in the software installer and install the LAMP pattern.

I might wish I hadn’t taken it off of Ubuntu before it is configured again. I am trying to run the new Host information. IOt is asking for Server name and Server contents Root. I thought the root might be the directory it is in. Don’t know what the server Resolution is either. Any help appreciated. Help need to get this server back up.

What is Certificate File Path and Key File Path for SSL?

I keep getting an error Cannot adjust "apache2 service.

First: please notice that we have no crystal ball, and no access to your system. This means that, to be able to help you, we need as much info as you can give. We’ll try to help you to get it back to work. But we need info, and feedback on what you do with the advice given. Any output, please put it in “code tags”, makes it much more readable. And…don’t panic and use your panic as a masterplan :smiley: .

Question 1: what is IOt ?
Question 2: was the server accessible by entering an IP or by entering a domainname?

And yep. Always backup.

Default server root on openSUSE is /srv/www/htdocs, that’s where you should move the website files too. Default user and group that run the webserver are ‘wwwrun’ and ‘www’. If you need MySQL, that needs to be setup too using the runlevel editor. Leaving the defaults during setup will render a working apache2 install, showing “It works !!” as mentioned above. Next thing will be to get your files in place so that the server is accessible locally. After that we will make it accessible from the outside.

All this can be configured from yast2-http-server. If you set it up using this tool instead of manually editting config files, it will, for instance, let you open a port in the firewall as well.

This is an excellent page by our admin swerdna on setting up a webserver on openSUSE : HowTo: Configure a Linux Apache Web Server on Suse/openSUSE for SSI, Includes, CGI, Common Gateway Interface, AddHandler, ExecCGI, AllowOverride, htaccess, DocumentRoot

BTW: Yast2 should be run with root permissions.

I am not sure What the term IOt means?
There server was accessible by entering the domain name of www.mikealrhughes.com. I do want to host a couple of other websites. I understand the backup. I had it backed up under Ubuntu that is why I still have the webpages and don’t have to reconstruct. I am not sure what config files from that setup I will be able to use in Open SUSE. I do appreciate any help I can get. Here is my email if you want to write me direct. I could even call you tomorrow if there would be time even. mail(at)mikealrhughes(dot)com. This is all a non-profit organization site.
As always appreciative of all help. Love learning computers. Only way to learn is dive in. I see CGI is mentioned. I had CGI scripts on an older setup would be good to be able to get that going for some forms down the road even.

I forgot before. I ran the server for the most part headless. I used bash sell from my iMac to get in. I also used Dreamweaver to upload updates to the pages. I ran Webmin for adding hosting and users. Could find Webmin for Open Suse.

Thanks again.

Dr. Mike Hughes, Minister
Manteno church of Christ

In my opinion you DID NOT make a backup in the sense the previous poster said. I think he/she meant that you keep your old Ubuntu server running or in a backup form (e.g. full hdd image backup) until you have the new server on openSUSE up/tested and running.

For the case you do not have 2 servers available at least an image of the old Ubuntu server as backup was needed in case the things go wrong with opensuse.

Now, getting back to your problem, I would suggest you take it step by step and solve it, but as some other person said, we need the info about your specific configuration of the former server:

You had more than one websites on it - so you need to setup the main server and than add other virtual hosts (if you have only one IP that these are Name based virtualhosts).

Were the websites - html onl? I.e. did you need mysql with them for some CMS’s blogs?

  1. try and configure your apache webserver for the main website
  2. set-up the other virutual hosts
  3. check other things you used before (e.g. I noticed you were using ssh from your macos machine)
    3… try cgi or what ever you want to test, etc.

Here is a link that might help you in understanding how to set-up your httpd Apache server: Chapter

Or try and understand swerdna’s setup.

Regarding webmin usage: I do not think you will be able to use it since the directory structure is quite different so in order to use it specific changes need to be done to the “module configuration” - at least that was the case with SLES 9 but I never got a 100% usable interface. Nevertheless the YAST web server configurator is quite easy to use to implement other websites.

Cheers and good luck.

I have my whole Ubuntu Server on an external Drive. If I needed to I could use HDclone and put it on a Hard Drive and put that in the Server and be back up without messing up what I have done on the SUSE so far. I only have one Server. I had to get my spare to my daughter for her Internet use. I will print the Apache server chapter you linked. I do appreciate all the help and will work through it more tomorrow. I did need to know where to put my config files and my webpage files.

Mike

Hello again macmikeal.

So you have a backup - that’s great, than you do not need to worry if the transition to OS is not successful though everybody will try and help you. :slight_smile:

IMHO you started to fast, and you should have taken some time to read about the new linux distro first but since you do not have where to test it - if you have a good PC you could try a Virtualbox install.

The path to the default web server root was given to you by Knurpht in the previous post (I think its also mentioned in the doc pages links you were already given)

/srv/www/htdocs

but notice that you can edit this path and/or set other paths from the YAST2 control interface.

I would also suggest that you use YAST2 for configuring the options rather than modifying manually since otherwise some conflicts can appear.

Cheers.

To add: on a headless openSUSE, one can still run Yast, albeit in an ncurses version. BTW. Yast means Yet Another Setup Tool. The yast2-http-server module can be added by


su -c 'zypper in yast2-http-server'

When I try to enable Apache2 in Yast2 under System Services (Runlevel): Services. I get this error:
/etc/init.d/apache2 start returned 7 (program is not running):

What do I need to do for this?

I got my web page files moved to the /srv/www/htdocs directory.

Thanks again for help:

Mike

macmikeal wrote:
> When I try to enable Apache2 in Yast2 under System Services (Runlevel):
> Services. I get this error:
> /etc/init.d/apache2 start returned 7 (program is not running):
>
> What do I need to do for this?

Look for HTTP Server on the main YaST page and follow the wizard to set
it up. If you don’t see HTTP Server there, it means you didn’t install
the package - install the LAMP pattern.

When I open Http Server Configuration and it comes up to listen Ports and Addresses it is set at Network Address 192.168.123.104 Port 80 but when it does the Error - kDialog says Switch will be removed from Perl core distribution in the next major release. Please install it from CPAN. It is being used at
/usr/share/YAST2/modules/YaPI/HTTPD.PM, line 299. I say Huh??

Forgot when I choose finish I get a message that says can’t adjust Apache2 service.

Mike

macmikeal wrote:
> When I open Http Server Configuration and it comes up to listen Ports
> and Adresses it is set at Network Address 192.168.123.104 Port 80 but
> when it does the Error - kDialog says Switch will be removed from Perl
> core distribution in the next major release. Please install it from
> CPAN. It is being used at
> /usr/share/YAST2/modules/YaPI/HTTPD.PM, line 299. I say Huh??

It’s only a warning. Ignore it for now. The devs should fix it before it
becomes a problem.

When I hit finish and it write the Apache2 settings and then tries to Enable Apache2 Service it gives me the error message.
Cannot adjust ‘apache2’ service.

On Thu, 10 Nov 2011 23:26:02 +0530, macmikeal
<macmikeal@no-mx.forums.opensuse.org> wrote:

>
> When I hit finish and it write the Apache2 settings and then tries to
> Enable Apache2 Service it gives me the error message.
> Cannot adjust ‘apache2’ service.
>

personally i’ve had better experiences after working through apache
documentation, in this case re. its config. files. used to be mainly one
file (httpd.conf), but eventually this got split up into different ones.
they call each other, so it’s not too difficult to figure out what happens.

that’s how i learned about apache originally, and i was never comfortable
trying to do it via yast. those couple of times i tried, either yast
didn’t understand me, or the other way around, but i always ended up
configuring by hand, and that always works – at times after lengthy
reading- and googling-sessions, admittedly.


phani.

I just tried to start apache2 from a terminal using the command /usr/sbin/rcapache2 start

I received the following message back: httpd2-prefork: could not reliably determine the server’s full qualified domain name using 127.0.0.1 for ServerName no listening sockets available, shutting down.
Unable to open logs
startproc: exit status of parent of /usr/sbin/httpd2-prefork:1

I seem to remember dealing with the full qualified domain name when I set this up once on Ubuntu but has been three years so don’t remember where that is set.

Any help appreciated!!

Mike

Whenever I start on a new machine to setup a LAMP server (have done dozens of them) I start using Yast, and configure it to listen to 127.0.0.1’s port 80 first. That way I can check whether MySQL ( I build Joomla sites mainly) runs properly, can test all other stuff on my laptop. Try replacing the IP entered with 127.0.0.1, then enter either that IP or ‘localhost’ in a browser.

Did that I get this from the browser -
Not Found

The requested URL / was not found on this server.
Apache/2.2.20 (Unix) DAV/2 Server at localhost Port 80

On Fri, 11 Nov 2011 00:56:02 +0530, macmikeal
<macmikeal@no-mx.forums.opensuse.org> wrote:

>
> I just tried to start apache2 from a terminal using the command
> /usr/sbin/rcapache2 start
>
> I received the following message back: httpd2-prefork: could not
> reliably determine the server’s full qualified domain name using
> 127.0.0.1 for ServerName no listening sockets available, shutting down.
> Unable to open logs
> startproc: exit status of parent of /usr/sbin/httpd2-prefork:1
>
> I seem to remember dealing with the full qualified domain name when I
> set this up once on Ubuntu but has been three years so don’t remember
> where that is set.
>
> Any help appreciated!!
>

that apache can’t find a ‘fully qualified domain name’ isn’t a big
problem, as long as you’re not trying to access it from other computers on
your network, or via named virtual hosts, per example. as the message
says, if it was running you could access it with a browser at these
addresses: http://127.0.0.1 and http://localhost.

the server doesn’t start because it can’t open a ‘listening socket,’ and
it can’t write log files either. these are declared as values in apache
config. files, what you’re trying to achieve via yast. i don’t have the
yast-http interface intalled, but somewhere you must specify on which
port(s) you want the web server to listen for requests, and the location &
names for log files.


phani