Apache 2-Setup on OpenSuse 12.1: issues with userid - how to solve?

Hello dear Linux-Experts - good day!

I have OpenSUSE 12.1 installed. I tried a lot to get the lampp on the system workin. i set it up by YAST - (with the sheme-installations) how to get it working. How to configure the apache? The question of the day is: How can I set up apache2 in ~/public_html?

I allways believed that by default, in openSUSE, the web server runs in the following directory


/public_html, 

But unfortunatly - i installed and the path i afterwards used was the following one… :


/srv/www/

Question: is this wrong!?

Well - once i have installed like this way and had terrible problems to write to the folders:

Guess that the **userid ** we use just matters. This leads to the question: How should i install the Apache - that i do not have any issues with the permissions!? Should i create a new user - for this tasks!?

I love to hear from you

greetings

btw:

PS; How should i install the Apache - that i do not have any issues with the permissions!?
BTW: last time i installed the Apache on OpenSuse i was able to see the file that is called **mod_userdir: ** - is this a important file. What should i do with this one!


    #
    # UserDir: The name of the directory that is appended onto a user's home
    # directory if a ~user request is received.
    #
    
    <IfModule mod_userdir.c>
    	# Note that the name of the user directory ("public_html") cannot easily be
    	# changed here, since it is a compile time setting. The apache package
    	# would have to be rebuilt. You could work around by deleting
    	# /usr/sbin/suexec, but then all scripts from the directories would be
    	# executed with the UID of the webserver.
    	# 
    	# To rebuild apache with another setting you need to change the 
    	# %userdir define in the spec file. 
    
    	# not every user's directory should be visible:
    	UserDir disabled root
    
    	# to enable UserDir only for a certain set of users, use this instead:
    	#UserDir disabled
    	#UserDir enabled user1 user2
    
    
    	# the UserDir directive is actually used inside the virtual hosts, to 
    	# have more control
    	#UserDir public_html
    
    	<Directory /home/*/public_html>
    
    		AllowOverride FileInfo AuthConfig Limit Indexes
    		Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
    
    		<Limit GET POST OPTIONS PROPFIND>
    			Order allow,deny
    			Allow from all
    		</Limit>
    
    		<LimitExcept GET POST OPTIONS PROPFIND>
    			Order deny,allow
    			Deny from all
    		</LimitExcept>
    
    	</Directory>
    
    </IfModule>


By the way: This time, i did not have checked if the userdir modue is loaded now!? Should i do this!? I did such tests on my old Apache Installation…


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.

Can we do some thing here?

The last time i checked this i got the following results:


linux-r4qe:/home/martin # apache2ctl -M |grep userdir
httpd2: Syntax error on line 188 of /etc/apache2/httpd.conf: Could not open configuration file /etc/apache2/sysconfig.d/include.conf: No such file or directory
linux-r4qe:/home/martin #

Some days ago i got the advice to check via YaST /etc/sysconfig editor and add userdir to the modules APACHE_MODULES section.

This will not answer all your questions, but give some things to contemplate.

.* /srv/www* has allready for many years been the default place for the webserver data on (open)SUSE. I do not know why you think it should be on /public_html.

. Apaches serving processes are by default owned by user wwwrun and group *www:
*

henk@boven:/etc/apache2> ps -eo euser,fgroup,command | grep apache
root     root     /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   www      /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   www      /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   www      /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   www      /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
wwwrun   www      /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
henk     wij      grep apache
henk@boven:/etc/apache2>

Thus data to be served, either in the default

DocumentRoot "/srv/www/htdocs"
ScriptAlias /cgi-bin/ "/srv/www/cgi-bin/"

and/or in other Alias configuration statements used in your configuration, should have ownership and access bits to fullfill the needed access (read, search and maybe write and execute).

On 2012-05-07 11:26, hcvv wrote:
> - /srv/www- has allready for many years been the default place for the
> webserver data on (open)SUSE. I do not know why you think it should be
> on -/public_html-.

Maybe there is confusion with “~/public_html”, the alternative place in
each user’s home.


Cheers / Saludos,

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