Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am pretty new to Linux and I tried to install & configure the Apache 2 on OpenSuse 12.1.

Is this the document-root? /home/username/public_html

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

Is Apache installed and configured correctly?

As you might find this question a bit silly or newbie-like, here are some explanations: I have installed the LAMP some months ago - but in a wrong 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';
}  

I always thougth that the path should be this one here:

/home/username/public_html

Update - especially for Oliver Salzburg

see here the both links

link one with some descriptions on the OpenSuse-Case detailed description on openSuse and some Advices that are discussed over there

share|improve this question
    
~ is already a placeholder for /home/username/. So ~/username/ would be incorrect. Also, what configuration guide are you talking about? –  Oliver Salzburg Mar 8 '12 at 16:03
    
i installed in opensuse - and i took YAST –  zero Mar 8 '12 at 16:06
add comment

1 Answer

/home/username/public_html is used in addition to the default web root when mod_userdir is loaded.

Some people use that functionality to put a website inside a users home directory. But 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.

Yours is set to /srv/www/htdocs, which, to my understanding, is the default location in OpenSUSE.

share|improve this answer
    
thx alot. In openSUSE, when we install a LAMP solution, usually we run the server in this folder : ~/username/public_html. So - one question did i install the Apache in srv/www, those folders belong to root. So we should change the ownership of those folders like that in terminal : Code: su - password your_hostname:/home/the_user_to_give_ownership # chown -R the_user_to_give_ownership:users /srv/www –  zero Mar 8 '12 at 16:07
    
Is that quoted from somewhere? It sounds like horrible advise, but that could be just because it's SUSE. –  Oliver Salzburg Mar 8 '12 at 16:09
    
hello Dear Oliver well - i have added two links in the inital posting! scroll to the end of the initial posting) Especially in the second link you can see what the OpenSuse-folks adviced me. ... would love to hear again from you - many greetings from Heidelberg - approx 80 km in the south of FFM ;-) –  zero Mar 8 '12 at 20:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.