• LordMorgoth
  • Registratie: April 2003
  • Niet online

LordMorgoth

Valar Morghulis!

Topicstarter
Gisteren ben ik begonnen met de installatie van Fedora 10 met als doel deze te gebruiken als webserver. Ik heb daarvoor de tutorial gebruikt op http://www.howtoforge.com...ver-fedora-10-ispconfig-3 .

Totaan de installatie van ISPConfig werkte alles prima inclusief de webserver; ik kon phpmyadmin gebruiken en de webinterface van squirrelmail.

Nadat ik ISPConfig geinstalleerd heb krijg ik de onderstaande melding wanneer ik Apache wil opstarten:

Starting httpd: [Mon Jun 01 22:53:32 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
[FAILED]


Met google ben ik niet veel wijzer geworden, zoals ik al zei is Linux vrij nieuw voor me. Kan iemand me hier in de goede richting wijzen?

De relevante gedeeltes uit de httpd.conf:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
 ServerTokens OS

ServerRoot "/etc/httpd"

PidFile run/httpd.pid

Timeout 120

KeepAlive Off

MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000

</IfModule>

<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75 
ThreadsPerChild     25
MaxRequestsPerChild  0

</IfModule>

Listen 80

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so


Include conf.d/*.conf

User apache
Group apache

ServerAdmin root@localhost
UseCanonicalName Off

DocumentRoot "/var/www/html"

<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

<Directory "/var/www/html">

    Options Indexes FollowSymLinks

    AllowOverride None

    Order allow,deny
    Allow from all

</Directory>

<IfModule mod_userdir.c>
    UserDir disabled

</IfModule>


DirectoryIndex index.html index.html.var

AccessFileName .htaccess

<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

TypesConfig /etc/mime.types

DefaultType text/plain

<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>

HostnameLookups Off
ErrorLog logs/error_log

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

CustomLog logs/access_log combined

ServerSignature On

Alias /icons/ "/var/www/icons/"

<Directory "/var/www/icons">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
</IfModule>

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8

AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif

ReadmeName README.html
HeaderName HEADER.html

IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw

LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW

ForceLanguagePriority Prefer Fallback

AddDefaultCharset UTF-8

AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

AddHandler type-map var

AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>
<IfModule mod_include.c>
    <Directory "/var/www/error">
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    </Directory>


</IfModule>
</IfModule>

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully


### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at 
# <URL:http://httpd.apache.org/docs/2.2/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier 
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

NameVirtualHost *:80
NameVirtualHost *:443
Include /etc/httpd/conf/sites-enabled/

[ Voor 86% gewijzigd door LordMorgoth op 01-06-2009 20:54 ]

Valar Morghulis! All men must die -- Jaqen H'ghar


  • Kees
  • Registratie: Juni 1999
  • Laatst online: 13:44

Kees

Serveradmin / BOFH / DoC
NameVirtualHost *:80
NameVirtualHost *:443

hebben geen vhost, tenzij je vergeten bent "/etc/httpd/conf/sites-enabled/" te posten en die stiekum toch een <virtualhost *:80> .. </virtualhost> hebben.

"Een serveradmin, voluit een serveradministrator, is dan weer een slavenbeheerder oftewel een slavendrijver" - Rataplan


  • LordMorgoth
  • Registratie: April 2003
  • Niet online

LordMorgoth

Valar Morghulis!

Topicstarter
Okay,

ik heb het volgende toegevoegd aan de httpd.conf:

code:
1
2
3
4
<VirtualHost *:80>
DocumentRoot /var/www/html
ServerName test.lan
</VirtualHost>


Nu krijg ik alleen nog een:

service httpd start
Starting httpd: [FAILED]

melding...

Valar Morghulis! All men must die -- Jaqen H'ghar


  • DiedX
  • Registratie: December 2000
  • Laatst online: 13:45
/var/log/httpd/error.log

DiedX supports the Roland™, Sound Blaster™ and Ad Lib™ sound cards


  • LordMorgoth
  • Registratie: April 2003
  • Niet online

LordMorgoth

Valar Morghulis!

Topicstarter
Raar maar waar, als ik SELinux disable werkt alles wel... Ik ga nog even verder spitten.

Valar Morghulis! All men must die -- Jaqen H'ghar


Verwijderd

LordMorgoth schreef op maandag 01 juni 2009 @ 23:35:
Raar maar waar, als ik SELinux disable werkt alles wel... Ik ga nog even verder spitten.
Volgens mij heb je die tutorial niet goed gelezen ;)


SELinux is a security extension of Fedora that should provide extended security. In my opinion you don't need it to configure a secure system, and it usually causes more problems than advantages (think of it after you have done a week of trouble-shooting because some service wasn't working as expected, and then you find out that everything was ok, only SELinux was causing the problem). Therefore I disable it (this is a must if you want to install ISPConfig later on).

Edit /etc/selinux/config and set SELINUX=disabled:


En ja ik ben het helemaal met Falko Timme van howtoforge eens. SELinux is crap.

  • LordMorgoth
  • Registratie: April 2003
  • Niet online

LordMorgoth

Valar Morghulis!

Topicstarter
Ik vond het eerlijk gezet onzin om SELinux uit te schakelen, mijnsinziens had dat gewoon moeten werken. Een van de replies op de tutorial was ook om SELinux aan te laten staan.

Valar Morghulis! All men must die -- Jaqen H'ghar


Verwijderd

LordMorgoth schreef op dinsdag 02 juni 2009 @ 18:56:
Ik vond het eerlijk gezet onzin om SELinux uit te schakelen, mijnsinziens had dat gewoon moeten werken. Een van de replies op de tutorial was ook om SELinux aan te laten staan.
Lol, als je nu een aantal jaar met Linux servers bezig bent eens kijken of je het nog steeds onzin vindt om SELinux uit te schakelen (Falko Timme de schrijver van de howto is een zeer ervaren Linux admin) ;)

Ik weet niet of je Theodore Ts’o kent maar zelfs hij heeft het helemaal gehad met SELinux. Zie de onderstaande quote van hem:

“...given the threat models and capabilities of the adversaries involved, that's probably appropriate... But that’s not necessarily appropriate for all users. SELINUX is so horrible to use, that after wasting a large amount of time enabling it and then watching all of my applications die a horrible death since they didn't have the appropriate hand-crafted security policy, caused me to swear off of it. For me, given my threat model and how much my time is worth, life is too short for SELinux.”
— Theodore Ts’o

[ Voor 3% gewijzigd door Verwijderd op 02-06-2009 19:58 ]


  • riddles
  • Registratie: April 2000
  • Laatst online: 26-05-2025
Ik heb met Selinux op CentOS nog weinig problemen gehad. Zo hier en daar heb ik wat sebools aan moeten zetten om bijv. phpmyadmin werkend te krijgen en ik heb op ieder systeem wel 1 of 2 custom policies om een applicatie aan het werk te krijgen, maar 99% van de applicaties werkt gewoon zoals je zou verwachten.
Ik zou niet zomaar een lamp systeem aan het net durven hangen (achter een firewall) zonder tenminste nog 1 extra beveiligingslaag erbij zoals selinux.

Verwijderd

riddles schreef op dinsdag 02 juni 2009 @ 20:52:
Ik zou niet zomaar een lamp systeem aan het net durven hangen (achter een firewall) zonder tenminste nog 1 extra beveiligingslaag erbij zoals selinux.
Dat is welliswaar jouw mening maar in de praktijk en zeker in complexe productie omgevingen zitten systemen als SELinux vanwege de complexiteit gewoon in de weg. RedHat is zo'n beetje de enigste vendor die SELinux pushed maar bij de rest van de Linux distro's staat de ontwikkeling van SELinux op een zeer laag pitje vanwege de ongelooflijke complexiteit van SELinux. Ik ben van mening dat SELinux dan ook een langzame dood zal sterven. Hetzelfde zie je met Xen dat heeft RedHat ook heel erg gepushed en wat zie je nu. RedHat trapt Xen eruit en zet alles op KVM.

En om nog maar eens een quote uit de praktijk van Damien Miller aan te halen:

"every medium to large Linux deployment that I am aware off has switched SELinux off. Once you stray from the default configurations that the system distributors ship with, the default policies no longer work and things start to break."
Pagina: 1