Gentoo Archives: gentoo-user

From: Allan Gottlieb <gottlieb@×××.edu>
To: gentoo-user@l.g.o
Subject: [gentoo-user] USERDIR problem with apache on new install
Date: Sat, 29 Sep 2012 15:11:46
Message-Id: yu97grcuarq.fsf@nyu.edu
1 On my new install USERDIR is not working.
2
3 When I try http://localhost/~gottlieb, firefox says
4 "you don't have permission to access /~gottlieb"
5 and the apache error log says
6 "client denied by server configuration: /local/allan/gottlieb/public_html"
7
8 The file permissions are ok since both
9 file:///home/gottlieb/public_html/index.html and
10 file:///home/gottlieb/public_html
11 work fine.
12
13 So I guess I screwed up the apache install, in particular USERDIR.
14
15 eix shows userdir (see below)
16
17 /etc/conf.d/apache2 has it (see below, diffs = with my working install)
18
19 I have restarted apache, shutdown the machine overnight, reinstalled
20 apache, but still no go.
21
22 What step did I foolishly miss?
23
24 thanks,
25 allan
26
27 ================================================================
28
29 newlap gottlieb # eix -e apache
30 [I] www-servers/apache
31 Available versions: (2) 2.2.22-r1 [M](~)2.4.2
32 {{debug doc ldap selinux ssl static suexec threads APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta cgi cgid charset_lite dav dav_fs dav_lock dbd deflate dir disk_cache dumpio env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http proxy_scgi reqtimeout rewrite setenvif speling status substitute unique_id userdir usertrack version vhost_alias" APACHE2_MPMS="event itk peruser prefork worker"}}
33 Installed versions: 2.2.22-r1(2)(10:23:21 PM 09/28/2012)(ldap ssl -debug -doc -selinux -static -suexec -threads APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias -asis -auth_digest -authn_dbd -cern_meta -charset_lite -dbd -dumpio -ident -imagemap -log_forensic -proxy -proxy_ajp -proxy_balancer -proxy_connect -proxy_ftp -proxy_http -proxy_scgi -reqtimeout -substitute -version" APACHE2_MPMS="-event -itk -peruser -prefork -worker")
34 Homepage: http://httpd.apache.org/
35 Description: The Apache Web Server.
36
37
38 newlap gottlieb # cat /etc/conf.d/apache2
39 # /etc/conf.d/apache2: config file for /etc/init.d/apache2
40
41 # ajg: Added support for USERDIR, i.e., ~/public_html
42
43 # When you install a module it is easy to activate or deactivate the modules
44 # and other features of apache using the APACHE2_OPTS line. Every module should
45 # install a configuration in /etc/apache2/modules.d. In that file will be an
46 # <IfDefine NNN> directive where NNN is the option to enable that module.
47 #
48 # Here are the options available in the default configuration:
49 #
50 # AUTH_DIGEST Enables mod_auth_digest
51 # AUTHNZ_LDAP Enables authentication through mod_ldap (available if USE=ldap)
52 # CACHE Enables mod_cache
53 # DAV Enables mod_dav
54 # ERRORDOCS Enables default error documents for many languages.
55 # INFO Enables mod_info, a useful module for debugging
56 # LANGUAGE Enables content-negotiation based on language and charset.
57 # LDAP Enables mod_ldap (available if USE=ldap)
58 # MANUAL Enables /manual/ to be the apache manual (available if USE=docs)
59 # MEM_CACHE Enables default configuration mod_mem_cache
60 # PROXY Enables mod_proxy
61 # SSL Enables SSL (available if USE=ssl)
62 # STATUS Enabled mod_status, a useful module for statistics
63 # SUEXEC Enables running CGI scripts (in USERDIR) through suexec.
64 # USERDIR Enables /~username mapping to /home/username/public_html
65 #
66 #
67 # The following two options provide the default virtual host for the HTTP and
68 # HTTPS protocol. YOU NEED TO ENABLE AT LEAST ONE OF THEM, otherwise apache
69 # will not listen for incomming connections on the approriate port.
70 #
71 # DEFAULT_VHOST Enables name-based virtual hosts, with the default
72 # virtual host being in /var/www/localhost/htdocs
73 # SSL_DEFAULT_VHOST Enables default vhost for SSL (you should enable this
74 # when you enable SSL)
75 #
76 APACHE2_OPTS="-D DEFAULT_VHOST -D USERDIR -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE"
77
78 # Extended options for advanced uses of Apache ONLY
79 # You don't need to edit these unless you are doing crazy Apache stuff
80 # As not having them set correctly, or feeding in an incorrect configuration
81 # via them will result in Apache failing to start
82 # YOU HAVE BEEN WARNED.
83
84 # PID file
85 #PIDFILE=/var/run/apache2.pid
86
87 # timeout for startup/shutdown checks
88 #TIMEOUT=10
89
90 # ServerRoot setting
91 #SERVERROOT=/usr/lib64/apache2
92
93 # Configuration file location
94 # - If this does NOT start with a '/', then it is treated relative to
95 # $SERVERROOT by Apache
96 #CONFIGFILE=/etc/apache2/httpd.conf
97
98 # Location to log startup errors to
99 # They are normally dumped to your terminal.
100 #STARTUPERRORLOG="/var/log/apache2/startuperror.log"
101
102 # A command that outputs a formatted text version of the HTML at the URL
103 # of the command line. Designed for lynx, however other programs may work.
104 #LYNX="lynx -dump"
105
106 # The URL to your server's mod_status status page.
107 # Required for status and fullstatus
108 #STATUSURL="http://localhost/server-status"
109
110 # Method to use when reloading the server
111 # Valid options are 'restart' and 'graceful'
112 # See http://httpd.apache.org/docs/2.2/stopping.html for information on
113 # what they do and how they differ.
114 #RELOAD_TYPE="graceful"
115 newlap gottlieb #

Replies

Subject Author
Re: [gentoo-user] USERDIR problem with apache on new install Michael Hampicke <gentoo-user@××××.biz>
Re: [gentoo-user] USERDIR problem with apache on new install Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] USERDIR problem with apache on new install (SOLVED) Allan Gottlieb <gottlieb@×××.edu>