1 |
Thanks for top-posting :o) |
2 |
|
3 |
This is still a bit mysterious for me. I've tried to do what you said, but |
4 |
apache still fails to start because it cannot |
5 |
open a listening port. Here's what I've figured out about what I have: |
6 |
/etc/conf.c/apache2 contains |
7 |
APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D MANUAL -D SSL -D |
8 |
SSL_DEFAULT_VHOST -D USERDIR" |
9 |
to which I contributed only USERDIR -- the other stuff came with the |
10 |
ebuild. Maybe I should drop the SSL stuff since my server has |
11 |
no https stuff (It does have htaccess and htpasswd stuff, but I think that's |
12 |
different). In any event, removing the SSL stuff does not change |
13 |
the problem. |
14 |
|
15 |
Everything else in that file is commented out, which I take to mean that |
16 |
default values are used. Among the defaults is |
17 |
#CONFIGFILE=/etc/apache2/httpd.conf |
18 |
and that file contains |
19 |
Include /etc/apache2/vhosts.d/*.conf |
20 |
And /etc/apache2/vhosts.d/ includes |
21 |
00_default_ssl_vhost.conf and 00_default_vhost.conf |
22 |
|
23 |
My 00_default_vhost.conf: |
24 |
=============== start 00_default_vhost.conf ========================== |
25 |
# If your host doesn't have a registered DNS name, enter its IP address |
26 |
here. |
27 |
# |
28 |
#ServerName www.example.com:80 |
29 |
ServerName www.kosmanor.com:80 |
30 |
|
31 |
#KOSMANOR changes |
32 |
#Listen 80 |
33 |
Listen 64.166.164.49:80 |
34 |
Listen localhost:80 |
35 |
|
36 |
# DocumentRoot: The directory out of which you will serve your |
37 |
# documents. By default, all requests are taken from this directory, but |
38 |
# symbolic links and aliases may be used to point to other locations. |
39 |
# |
40 |
# If you change this to something that isn't under /var/www then suexec |
41 |
# will no longer work. |
42 |
DocumentRoot "/var/www/localhost/htdocs" |
43 |
|
44 |
# This should be changed to whatever you set DocumentRoot to. |
45 |
<Directory "/var/www/localhost/htdocs"> |
46 |
# Possible values for the Options directive are "None", "All", |
47 |
# or any combination of: |
48 |
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI |
49 |
MultiViews |
50 |
# |
51 |
# Note that "MultiViews" must be named *explicitly* --- "Options |
52 |
All" |
53 |
# doesn't give it to you. |
54 |
# |
55 |
# The Options directive is both complicated and important. Please |
56 |
see |
57 |
# http://httpd.apache.org/docs/2.2/mod/core.html#options |
58 |
# for more information. |
59 |
Options Indexes FollowSymLinks |
60 |
|
61 |
# AllowOverride controls what directives may be placed in .htaccess |
62 |
files. |
63 |
# It can be "All", "None", or any combination of the keywords: |
64 |
# Options FileInfo AuthConfig Limit |
65 |
AllowOverride All |
66 |
|
67 |
# Controls who can get stuff from this server. |
68 |
Order allow,deny |
69 |
Allow from all |
70 |
</Directory> |
71 |
|
72 |
<IfModule alias_module> |
73 |
# Redirect: Allows you to tell clients about documents that used to |
74 |
# exist in your server's namespace, but do not anymore. The client |
75 |
# will make a new request for the document at its new location. |
76 |
# Example: |
77 |
# Redirect permanent /foo http://www.example.com/bar |
78 |
|
79 |
# Alias: Maps web paths into filesystem paths and is used to |
80 |
# access content that does not live under the DocumentRoot. |
81 |
# Example: |
82 |
# Alias /webpath /full/filesystem/path |
83 |
# |
84 |
# If you include a trailing / on /webpath then the server will |
85 |
# require it to be present in the URL. You will also likely |
86 |
# need to provide a <Directory> section to allow access to |
87 |
# the filesystem path. |
88 |
|
89 |
# ScriptAlias: This controls which directories contain server |
90 |
scripts. |
91 |
# ScriptAliases are essentially the same as Aliases, except that |
92 |
# documents in the target directory are treated as applications and |
93 |
# run by the server when requested rather than as documents sent to |
94 |
the |
95 |
# client. The same rules about trailing "/" apply to ScriptAlias |
96 |
# directives as to Alias. |
97 |
ScriptAlias /cgi-bin/ "/var/www/localhost/cgi-bin/" |
98 |
</IfModule> |
99 |
|
100 |
# "/var/www/localhost/cgi-bin" should be changed to whatever your |
101 |
ScriptAliased |
102 |
# CGI directory exists, if you have that configured. |
103 |
<Directory "/var/www/localhost/cgi-bin"> |
104 |
AllowOverride None |
105 |
Options None |
106 |
Order allow,deny |
107 |
Allow from all |
108 |
</Directory> |
109 |
|
110 |
# vim: ts=4 filetype=apache |
111 |
=============== end 00_default_vhost.conf ========================== |
112 |
|
113 |
|
114 |
On 9/6/07, Alexander Reitzel <loel@×××.de> wrote: |
115 |
> |
116 |
> you should look at your vhost configs. take an example of the current |
117 |
> default_vhost config and make sure to keep the -D DEFAULT_VHOST |
118 |
> in /etc/conf.d/apache2 |
119 |
> Ive had the same problem with one of my servers and after using the |
120 |
> default |
121 |
> thiggie it worked fine. |
122 |
> |
123 |
> Am Freitag, 7. September 2007 03:08:43 schrieb Kevin O'Gorman: |
124 |
> > Somewhere in the update to 2.2.4-r12, listening got lost. I tried to |
125 |
> > follow instructions, |
126 |
> > but apparently failed. |
127 |
> > |
128 |
> > Here's what happens (minus a MaxClients warning that doesn't look like a |
129 |
> > show-stopper): |
130 |
> > |
131 |
> > treat init.d # ./apache2 start |
132 |
> > * Starting apache2 ... |
133 |
> > (98)Address already in use: make_sock: could not bind to address |
134 |
> > 64.166.164.49:80 |
135 |
> > no listening sockets available, shutting down |
136 |
> > Unable to open |
137 |
> > logs |
138 |
> > [ !! ] |
139 |
> > treat init.d # |
140 |
> > |
141 |
> > So it got my instructions to listen, but failed. |
142 |
> > |
143 |
> > Looking at 'netstat --inet -l' does not show any listeners or open |
144 |
> sockets |
145 |
> > on port 80. |
146 |
> > |
147 |
> > What else should I look at? |
148 |
> |
149 |
> |
150 |
> -- |
151 |
> gentoo-user@g.o mailing list |
152 |
> |
153 |
> |
154 |
|
155 |
|
156 |
-- |
157 |
Kevin O'Gorman, PhD |