installation & configuation the Apache 2 on OpenSuse 12.1 - a quick walktrough

Hello dear Linux-experts, good day.

i am pretty new to Linux i tried to installl & configure the Apache 2 on OpenSuse 12.1 - here my quick walktrough

is this correct!? see the page 3 /or 4 of the configuration guide.of the http server…


Document Root: "/srv/www/htdocs"
Directory; "/srv/www/htdocs"
Alias: /icons/ "/usr/share/apache2/icons/"
Directory: "/usr/share/apache2/icons"
Script Alias: /cgi-bin/ "/srv/www/cgi-bin/"
Directory: "/srv/www/cgi-bin"
mod_userdir.c: empty here nothing is filled in ;-)
include: /etc/apache2/conf.d/*.conf
include: /etc/apache2/conf.d/apache2-manual?conf
Servername linux-r4qe
E-Mail des Servername: root@linux-r4qe

while running the **apache-configuring tool i have on page 5/5 **


listening on
all, port 80
Standardhost
in 
SSL deaktiviert
Virtuelle Hosts
linux-r4qe in "/srv/www/htdocs", SSL deaktiviert

well my question is - i s the apache installed and configured correct!?

hope everything is okay here.

i also tried to install / and configure the** mysql-server… well see the following: **


In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
Enter current password for root (enter for none): 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysql.sock' (2)
Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for                                                                                                                                                                                                            
them.  This is intended only for testing, and to make the installation                                                                                                                                                                                                         
go a bit smoother.  You should remove them before moving into a                                                                                                                                                                                                                
production environment.                                                                                                                                                                                                                                                        
                                                                                                                                                                                                                                                                               
Remove anonymous users? [Y/n] y                                                                                                                                                                                                                                                
 ... Success!                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                               
Normally, root should only be allowed to connect from 'localhost'.  This                                                                                                                                                                                                       
ensures that someone cannot guess at the root password from the network.                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                               
Disallow root login remotely? [Y/n] y                                                                                                                                                                                                                                          
 ... Success!                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                               
By default, MySQL comes with a database named 'test' that anyone can                                                                                                                                                                                                           
access.  This is also intended only for testing, and should be removed                                                                                                                                                                                                         
before moving into a production environment.                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                               
Remove test database and access to it? [Y/n] y                                                                                                                                                                                                                                 
 - Dropping test database...                                                                                                                                                                                                                                                   
 ... Success!                                                                                                                                                                                                                                                                  
 - Removing privileges on test database...                                                                                                                                                                                                                                     
 ... Success!                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                               
Reloading the privilege tables will ensure that all changes made so far                                                                                                                                                                                                        
will take effect immediately.                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                               
Reload privilege tables now? [Y/n] y                                                                                                                                                                                                                                           
 ... Success!                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                               
Cleaning up...                                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                              


All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!

guess that mysql is totally okay .

well my question is - i s the apache installed and configured correct!?

btw - is this the correct path to phpmyadmin ( which is installed )

http://localhost/phpmyadmin

i get an error!?

what is wrong here

On 2012-03-07 00:16, dilbertone wrote:

> is this correct!? see the page 3 /or 4 of the configuration
> guide.of the http server…

What guide?

You simply use yast to install apache.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Hi
If the site is visible to the internet, just a word of caution, where
ever you do find it, move and rename it… You might want to
look at installing something like awstats to see all the attempts on
various scripts by hackers/bots etc.


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.27-default
up 0:44, 4 users, load average: 0.06, 0.07, 0.06
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Plaese do not use PHP code wrappers when it is not PHP code. Use CODE wrappers. All the colours distract from interpreting the text.

To install Apache, PHP and MySQL you go to YaST > Software > Software management, the you choose Patterns from the View menu, there you check Web and PAMP server for install. Did you do hat?

good day

hello Henk, hello malcom hello Robin - many many thanks for the hints - the posting and all your help … so far and also in this thread. i am very very happy with all the supportive help here in this great forum.

Generally spoken: i am very very glad to be here in this place. You have helped me a trillion times!!!

@ Malcom; i try to do as adviced… will read some basic literature bout apache and linux.
@ robin : i have had a look at the following guides - . sorry - they are written in German…openSUSE Webserver | mnTechBlog

are there any appropiate guides in english language??

well - hmm i hope everything is okay here.

update: as you might find this question a bit silly or newbie-like. here some explanations - i have installed the lamp some months ago - but in a wront path…

public $unicodeslugs = ‘0’;
public $feed_limit = ‘10’;
public $log_path = ‘/srv/www/htdocs/basic/logs’;
public $tmp_path = ‘/srv/www/htdocs/basic/tmp’;
public $lifetime = ‘15’;
public $session_handler = ‘database’;
}

this caused some troubles - eg. permission.errors

In openSUSE, when we install a LAMP solution, usually we run the server in this folder :

~/username/public_html.

Since i have had installed my LAMP in srv/www, those folders belong to root. So i had to change the ownership of those folders like that in terminal :

su -
password
your_hostname:/home/the_user_to_give_ownership # chown -R the_user_to_give_owners

well - as it seems ( see the initial-posting with the paths etc etx) - i have configured the apache 2 now properly -
so that i now might want to run into the issues i ran last time - when installed the

**

public $log_path = '/srv/www/htdocs/';

**

do you now understand my concearns and fears - and my posting,!? i want to go round some issues with permissons and things
like that. - and i think that the best it would be to install the apache to

~/username/public_html.

greetings

There are some things I do not understand here:

. I asked you to post computer text between CODE tags and added a link to how to do this. But you post above is NOT between CODE tags. And I add that between those CODE tags, you should post by copy/paste from the terminal window including the prompt where you start typing a command. Thus we can see who you are (root or not), what your working directory is, all in a glance without you having to tell all those things.

. I asked how you installed LAMP. Now you only tell you did " i have installed the lamp some months ago - but in a wront path…". When you install using YaST (or zypper), you can not do this in the wrong place. I guess this is some sort of way to tell you did not do it in the correct openSUSE way. You then better deinstall what you did some months ago and do it the correct way. We can not know what you did some months ago and what you did correct or wrong. Thus we will most probably not be able to advise you on your situation.

And BTW, /srv/www/htdocs is only the place where the web pages go. It is not the place where Apache is installed.

On 2012-03-07 10:26, hcvv wrote:

> I asked how you installed LAMP. Now you only tell you did " i have
> installed the lamp some months ago - but in a wront path…". When you
> install using YaST (or zypper), you can not do this in the wrong place.
> I guess this is some sort of way to tell you did not do it in the
> correct openSUSE way. You then better deinstall what you did some months
> ago and do it the correct way. We can not know what you did some months
> ago and what you did correct or wrong. Thus we will most probably not be
> able to advise you on your situation.

And same goes for apache. I can not know what those instructions say, but
installing apache is a one click operation in openSUSE. I can not try to
solve a problem with a strange documentation.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

That is included in LAMP, the A stands for Apache. :wink:

hello robin hello henk hell malcom hello at all

just a short reply - as i am in a hurry atm.
thx for all the input - i try to answer all your questions later the day.

just a quick anwer about how i installed the stuff. i did it via yast-patterns - or shemes
a more complete answer will follow,… later the day.

btw: Malcom asked me some weeks ago - in a nother thread the following question:

And also have you checked the userdir modue is loaded?
Code:

apache2ctl -M |grep userdir
[Mon Feb 27 08:10:49 2012] [warn] module rewrite_module is already
loaded, skipping userdir_module (shared)
Syntax OK

If not the check via YaST /etc/sysconfig editor and add userdir to
the modules APACHE_MODULES section.

well - as i am pretty new to apache. Do i need to have the above mentioned userdir. Do i need it in every circumstance - and
a. can i not run an apache without that stuff
b. should i install it in my above mentioned situation - see the initial posting of this thread

c, what is it good for - why the userdir is existing!? :wink:

love to hear from you

On 2012-03-07 15:16, hcvv wrote:
>
> robin_listas;2446502 Wrote:
>>
>> And same goes for apache.
> That is included in LAMP, the A stands for Apache. :wink:

Ah, ok, I never installed that one.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

note:

well to be more correct here. i did it stepwise.
i had to configure the mysql seperately…

so to be precise - i only installed the apache 2

note: mysql is installed by default (on opensuse)

so i did only the configuration of mysql

IMHO you are jumping around a bit chaotic.

I guess that the userdir module is for allowing Apache to serve from the users home directories. If you do not plan to do that (and simply to serve from /srv/www), you then do not need it.

But I am a bit lost now about what your question is. Somewhere you say I installed Apache, somewhere else you ask “is Apache installed”. Then you are working with some sort of guide that probably none of us has ever seen.

Please tell if you need help. And when yes, formulate exactly and precise what you did, what you expected to get and what you got instead, because these three (3) pieces are needed to describe a problem. Like:

  • I entered the room and switched the switch next to the door;
  • I expected that the main light in the room would start giving light;
  • Instead there was a huge explosion and one wall of the room disappeared.

On 2012-03-07 15:26, dilbertone wrote:

> btw: Malcom asked me some weeks ago - in a nother thread the following
> question:

You should ask this in that other thread, here we can not know what he said
or what you said.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

hello Henk hello Robin

thx for answering! GREAT to hear from you

well i only have one question - why on **earth i allways ge this document root. **

Document Root: "**/srv/www/htdocs
**


Document Root: "/srv/www/htdocs"
Directory; "/srv/www/htdocs"
Alias: /icons/ "/usr/share/apache2/icons/"
Directory: "/usr/share/apache2/icons"
Script Alias: /cgi-bin/ "/srv/www/cgi-bin/"
Directory: "/srv/www/cgi-bin"
mod_userdir.c: empty here nothing is filled in ;-)
include: /etc/apache2/conf.d/*.conf
include: /etc/apache2/conf.d/apache2-manual?conf
Servername linux-r4qe
E-Mail des Servername: root@linux-r4qe

i thougth that it **should be **this one here

 ~/username/public_html.

**Background: **i installed the Apache some weeks ago - on a different machine - (openSuse 11.4) and run into serious troubles:

i installed the apache 2 with the YAST-Guide - and after all

i got this path: srv/www/htdocs/basic

**BTW **see the paths


PHP Code:
public $unicodeslugs = '0';
    public $feed_limit = '10';
    public $log_path = '/srv/www/htdocs/basic/logs';
    public $tmp_path = '/srv/www/htdocs/basic/tmp';
    public $lifetime = '15';
    public $session_handler = 'database';
} 

well the issue that arises - when i try to install some extensions i got the error - can t move files! Well i am a bit unsure where this issue has its origin. What causes this error!?

This leads to a ****ed permission error.

Note; In openSUSE, when we install a LAMP solution, usually you run your server in this folder : ~/username/public_html. Since i installed your LAMP in srv/www, those folders belong to root.

see for more infos here: http://forums.opensuse.org/english/get-technical-help-here/applications/470661-lampp-file-permissions-causes-terrific-errors-server.html

Note: the big big question is - why on earth i allways get the (wrong) document-root - that is here:

Document Root: "**/srv/www/htdocs[size=3]

Why do i not get the normal path to

[/size]**

 ~/username/public_html.

love to hear from you

dear Folks dear , Robin, hello Malcom, good day Henk,

i soon get crazy. Sure thing.

well - i think

the path:

/home/username/public_html 

is used in addition to the default web root when mod_userdir is loaded. But do i need to load the mod_userdir too!?
Some people love to use that functionality to put a website inside a users home directory. But i also heard that it’s by no means the standard way of doing things.

The document root for a given Apache site configuration is defined by the **DocumentRoot directive. **Where can i change this one!?

Mine is **unfortunatly ** set to /srv/www/htdocs, which, to my understanding, is the default location in OpenSUSE

Can any body advice me to **put this to the path **


~/username/public_html.

Since i installed my LAMP in srv/www, those folders belong to root. So i have to change the ownership of those folders like that in terminal - … what do you say!?

On 2012-03-08 17:16, dilbertone wrote:
> … what do you say!?

Nothing. I do not read those strange fonts.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)