Am 2005-04-14 11:01:43, schrieb Bastian Venthur: > Danke für den Hinweis, damit hat sich ssl für mich glaub ich erledigt. > Nachdem ich die Doku von Apache gelesen habe, kommt es mir so vor, als wäre > NameBasedVH quasi der Nachfolger vom etwas sperrigen IPBasedVH. Und das wie > ich finde zu recht, denn IPBasedVH lassen wohl nur einen VH pro IP zu, so > dass man sich virtuelle NICs anlegen muss/kann um mehrere VH auf einer IP > zu betreiben! Stimmt nicht ganz so, denn ich habe in Paris einen VServer laufen, auf dem ich 5200 VHosts habe. Hier verwende ich NameBased VHosts, denn für NUR http server benötige ich keine 5200 IP's IPBased VHosts ist eigentlich NUR für SSL basierende Hosts oder wenn Du mal einen physikalischen Server wegen Wartung auslagern mußt. Nebem meinen 5200 VHosts habe ich des öfteren auch ander IPBased VHosts von meinen kunden, die nur über einen einzigen WebServer verfügen und der runtergefahren werden muß wegen austauach neuer Hardware oder sonatwas. > Da SSL aber auf IPBasedVH aufbaut, muss man neben Apache auch noch im System > rumwerkeln, was ich prinzipiell ablehne wenns nicht unbedingt nötig ist und > auch sonst ziemlich unintuitiv finde (Ein Webserver sollte mir nicht > vorgeben wieviele NICs mein System haben muss, wenn es auch anders ginge). Was hat das mit NICs zu tun ? Ich habe auf meinem ADSL-Router ja auch 80 mit 67 VHosts (5 physikalische Server) 443 1 Server IPBased 21 1. VServer 22 1. VServer 53 mein DNS-Server 25 courier (smtp) 110 courier (pop3) 220 courier (imap) 993 courier (imaps) 995 courier (pop3s) Alles andere wird nicht benötigt. Sprich, das ist das, was der ADSL Modem-Router machen soll. Übrigends geht port 80 über einen Squid, der den richtigen physikalischen Server findet. > Der Softwaretechniker in mir fragt sich sofort: Warum mutet man dem Nutzer > einen solchen Spagat zu, wenn die Software das auch von sich aus könnte? Ich verstehe nicht was Du meinst ? Mein www.tamay-dogan.homelinux.net hat die IP Adrersse 192.168.1.10 und trägt über 30 VHosts. Alles IPbased. genause www.debian.tamay-dogan.net. Ich habe hier 9 physikalische Webserver mit ewig vielen VHosts auf einer einzigen dynamischen IP-Adresse meiner ADSL Modem-Routers Anm.: Für die offentlichen Domains mußt Du am ender der Domain nicht .net sondern .homelinux.net verwenden. __( '/etc/hosts' )____________________________________________________ / | # /etc/hosts | # | 127.0.0.1 localhost | | ###################################################################### | # publicnet | ###################################################################### | 192.168.1.0 | 192.168.1.1 router.tamay-dogan.net router | 192.168.1.2 dns1.tamay-dogan.net dns1 | 192.168.1.4 admin.tamay-dogan.net admin 1. physikalischer Webserver (SSL) | 192.168.1.5 asterisk.tamay-dogan.net asterisk 2. physikalischer Webserver | 192.168.1.8 doc.tamay-dogan.net doc 3. physikalischer Webserver | 192.168.1.9 ftp.tamay-dogan.net ftp | | 192.168.1.10 www.tamay-dogan.net www | 192.168.1.10 dos.tamay-dogan.net dos | 192.168.1.10 wfw.tamay-dogan.net wfw | 192.168.1.10 win32.tamay-dogan.net win32 | 192.168.1.10 mac.tamay-dogan.net mac | 192.168.1.10 hardware.tamay-dogan.net hardware <snip> 4. physikalischer Webserver (über 30 VHosts) | 192.168.1.11 webmail.tamay-dogan.net webmail 5. physikalischer Webserver | 192.168.1.11 mail.tamay-dogan.net mail | 192.168.1.11 pop3.tamay-dogan.net pop3 | 192.168.1.11 imap.tamay-dogan.net imap | 192.168.1.11 smtp.tamay-dogan.net smtp | | 192.168.1.14 www.debian.tamay-dogan.net www.debian | 192.168.1.14 xmms.debian.tamay-dogan.net xmms.debian | 192.168.1.14 devel.debian.tamay-dogan.net devel.debian | 192.168.1.14 buzz.debian.tamay-dogan.net buzz.debian | 192.168.1.14 rex.debian.tamay-dogan.net rex.debian | 192.168.1.14 bo.debian.tamay-dogan.net bo.debian | 192.168.1.14 hamm.debian.tamay-dogan.net hamm.debian | 192.168.1.14 slink.debian.tamay-dogan.net slink.debian | 192.168.1.14 potato.debian.tamay-dogan.net potato.debian | 192.168.1.14 woody.debian.tamay-dogan.net woody.debian | 192.168.1.14 sarge.debian.tamay-dogan.net sarge.debian | 192.168.1.14 etch.debian.tamay-dogan.net etch.debian | 192.168.1.14 sid.debian.tamay-dogan.net sid.debian <snip> 6. physikalischer Webserver (über 18 VHosts) | # 192.168.1.15 wfw.tamay-dogan.net wfw | # 192.168.1.16 dos.tamay-dogan.net dos | # 192.168.1.17 win32.tamay-dogan.net win32 | # 192.168.1.18 mac.tamay-dogan.net mac <snip> 7. physikalischer Webserver (8 VHosts) | 192.168.1.19 onlinestore.tamay-dogan.net onlinestore 8. physikalischer Webserver | 192.168.1.20 acc576-A.tamay-dogan.net acc576-A | 192.168.1.21 acc576-01.tamay-dogan.net acc576-01 | 192.168.1.22 acc576-02.tamay-dogan.net acc576-02 | 192.168.1.23 acc576-03.tamay-dogan.net acc576-03 | 192.168.1.24 acc576-04.tamay-dogan.net acc576-04 | ###################################################################### | # cybernet | ###################################################################### | 192.168.1.114 www.cybercenter.tamay-dogan.net www.cybercenter | 192.168.1.114 afghanistan.cybercenter.tamay-dogan.net afghanistan.cybercenter | 192.168.1.114 france.cybercenter.tamay-dogan.net france.cybercenter | 192.168.1.114 iran.cybercenter.tamay-dogan.net iran.cybercenter | 192.168.1.114 lebanon.cybercenter.tamay-dogan.net lebanon.cybercenter | 192.168.1.114 morocco.cybercenter.tamay-dogan.net morocco.cybercenter | 192.168.1.114 syria.cybercenter.tamay-dogan.net syria.cybercenter | 192.168.1.114 turkey.cybercenter.tamay-dogan.net turkey.cybercenter | 192.168.1.114 lists.cybercenter.tamay-dogan.net lists.cybercenter <snip> 9. physikalischer Webserver (über 17 VHosts) \______________________________________________________________________ VHosts sehen bei mir z.b. so aus: __( '/home/Configs/vhosts/michelle.konzack' )_________________________ / | #################################################################### | # | # Virtualhost for michelle.konzack | # | #################################################################### | <VirtualHost 192.168.1.69:80> | ServerAdmin linux4michelle@freenet.de | DocumentRoot /home/michelle.konzack/public_html | | ServerName michelle.konzack.home.tamay-dogan.net | ServerAlias michelle.konzack.home.tamay-dogan.homelinux.net | UseCanonicalName off | | ErrorLog /home/michelle.konzack/log/apache/error.log | CustomLog /home/michelle.konzack/log/apache/access.log full | | <Directory /home/michelle.konzack/public_html> | AllowOverride FileInfo AuthConfig Limit | Options ExecCGI MultiViews Indexes SymLinksIfOwnerMatch Includes | DirectoryIndex index index.php index.html index.htm | <Limit GET POST OPTIONS PROPFIND> | Order allow,deny | Allow from all | </Limit> | <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> | Order deny,allow | Deny from all | </Limit> | </Directory> | </VirtualHost> \______________________________________________________________________ ich habe also für jeden VHost eine eigene config und source mit __( '/etc/apache/httpd.conf' )________________________________________ / | ## | ## httpd.conf -- Apache HTTP server configuration file | ## | | ### Section 1: Global Environment | | ServerType standalone | ServerRoot /etc/apache | LockFile /var/lock/apache.lock | PidFile /var/run/apache.pid | ScoreBoardFile /var/run/apache.scoreboard | | #ResourceConfig /etc/apache/srm.conf | #AccessConfig /etc/apache/access.conf | Timeout 300 | | KeepAlive On | MaxKeepAliveRequests 100 | KeepAliveTimeout 15 | | MinSpareServers 5 | MaxSpareServers 10 | StartServers 5 | MaxClients 150 | MaxRequestsPerChild 100 | | #Listen 80 | #Listen 192.168.1.10 | | BindAddress 192.168.1.10 | | # Please keep this LoadModule: line here, it is needed for installatio | n. | LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so | # LoadModule env_module /usr/lib/apache/1.3/mod_env.so | LoadModule config_log_module /usr/lib/apache/1.3/mod_log_config.so | LoadModule mime_magic_module /usr/lib/apache/1.3/mod_mime_magic.so | LoadModule mime_module /usr/lib/apache/1.3/mod_mime.so | LoadModule negotiation_module /usr/lib/apache/1.3/mod_negotiation.so | LoadModule status_module /usr/lib/apache/1.3/mod_status.so | LoadModule info_module /usr/lib/apache/1.3/mod_info.so | LoadModule includes_module /usr/lib/apache/1.3/mod_include.so | LoadModule autoindex_module /usr/lib/apache/1.3/mod_autoindex.so | LoadModule dir_module /usr/lib/apache/1.3/mod_dir.so | LoadModule cgi_module /usr/lib/apache/1.3/mod_cgi.so | # LoadModule asis_module /usr/lib/apache/1.3/mod_asis.so | # LoadModule imap_module /usr/lib/apache/1.3/mod_imap.so | # LoadModule action_module /usr/lib/apache/1.3/mod_actions.so | LoadModule speling_module /usr/lib/apache/1.3/mod_speling.so | LoadModule userdir_module /usr/lib/apache/1.3/mod_userdir.so | LoadModule alias_module /usr/lib/apache/1.3/mod_alias.so | LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so | LoadModule access_module /usr/lib/apache/1.3/mod_access.so | LoadModule auth_module /usr/lib/apache/1.3/mod_auth.so | # LoadModule anon_auth_module /usr/lib/apache/1.3/mod_auth_anon.so | # LoadModule dbm_auth_module /usr/lib/apache/1.3/mod_auth_dbm.so | # LoadModule db_auth_module /usr/lib/apache/1.3/mod_auth_db.so | # LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so | # LoadModule digest_module /usr/lib/apache/1.3/mod_digest.so | # LoadModule cern_meta_module /usr/lib/apache/1.3/mod_cern_meta.so | LoadModule expires_module /usr/lib/apache/1.3/mod_expires.so | # LoadModule headers_module /usr/lib/apache/1.3/mod_headers.so | # LoadModule usertrack_module /usr/lib/apache/1.3/mod_usertrack.so | LoadModule unique_id_module /usr/lib/apache/1.3/mod_unique_id.so | LoadModule setenvif_module /usr/lib/apache/1.3/mod_setenvif.so | # LoadModule sys_auth_module /usr/lib/apache/1.3/mod_auth_sys.so | # LoadModule put_module /usr/lib/apache/1.3/mod_put.so | LoadModule throttle_module /usr/lib/apache/1.3/mod_throttle.so | # LoadModule allowdev_module /usr/lib/apache/1.3/mod_allowdev.so | # LoadModule eaccess_module /usr/lib/apache/1.3/mod_eaccess.so | LoadModule php4_module /usr/lib/apache/1.3/libphp4.so | # LoadModule roaming_module /usr/lib/apache/1.3/mod_roaming.so | | ExtendedStatus On | | | ### Section 2: 'Main' server configuration | Port 80 | User www-data | Group www-data | ServerAdmin xxx.xxxxx@xxxxxxx.xx | ServerName www.tamay-dogan.net | DocumentRoot /home/home/public_html | | <Directory /> | Options SymLinksIfOwnerMatch | AllowOverride None | </Directory> | | <Directory /home/home/public_html> | Options Indexes Includes IncludesNOEXEC FollowSymLinks MultiViews | ExecCGI | AllowOverride None | Order allow,deny | Allow from all | </Directory> | | #<IfModule mod_userdir.c> | # UserDir public_html | #</IfModule> | | <Directory /home/*/public_html> | AllowOverride FileInfo AuthConfig Limit | Options ExecCGI MultiViews Indexes SymLinksIfOwnerMatch Includes | <Limit GET POST OPTIONS PROPFIND> | Order allow,deny | Allow from all | </Limit> | <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> | Order deny,allow | Deny from all | </Limit> | </Directory> | | <IfModule mod_dir.c> | DirectoryIndex index index.php index.html index.htm index.shtml in | dex.cgi | </IfModule> | | AccessFileName .htaccess | | <Files ~ "^.ht"> | Order allow,deny | Deny from all | </Files> | | #CacheNegotiatedDocs | UseCanonicalName On | TypesConfig /etc/mime.types | DefaultType text/plain | | <IfModule mod_mime_magic.c> | MIMEMagicFile share/magic | </IfModule> | | HostnameLookups Off | | ErrorLog /var/log/apache/error.log | LogLevel warn | | LogFormat "%V %h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %T" full | LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %P %T" debug | 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 /var/log/apache/access.log common | #CustomLog /var/log/apache/referer.log referer | #CustomLog /var/log/apache/agent.log agent | #CustomLog /var/log/apache/access.log combined | CustomLog /var/log/apache/access.log full | | ServerSignature EMail | | Alias /icons/ /usr/share/apache/icons/ | | <Directory /usr/share/apache/icons> | Options Indexes MultiViews | AllowOverride None | Order allow,deny | Allow from all | </Directory> | | ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ | | <Directory /usr/lib/cgi-bin/> | AllowOverride None | Options ExecCGI | Order allow,deny | Allow from all | </Directory> | | <IfModule mod_autoindex.c> | | IndexOptions FancyIndexing NameWidth=* | | 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/deb.gif .deb | | AddIcon /icons/back.gif .. | AddIcon /icons/hand.right.gif README | AddIcon /icons/folder.gif ^^DIRECTORY^^ | AddIcon /icons/blank.gif ^^BLANKICON^^ | | DefaultIcon /icons/unknown.gif | | #AddDescription "GZIP compressed document" .gz | #AddDescription "tar archive" .tar | #AddDescription "GZIP compressed tar archive" .tgz | | ReadmeName README | HeaderName HEADER | | IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t | | </IfModule> | | <IfModule mod_mime.c> | | AddEncoding x-compress Z | AddEncoding x-gzip gz tgz | | AddLanguage da .dk | AddLanguage nl .nl | AddLanguage en .en | AddLanguage et .ee | AddLanguage fr .fr | AddLanguage de .de | AddLanguage el .el | AddLanguage it .it | AddLanguage ja .ja | AddCharset ISO-2022-JP .jis | AddLanguage pl .po | AddCharset ISO-8859-2 .iso-pl | AddLanguage pt .pt | AddLanguage pt-br .pt-br | AddLanguage ltz .lu | AddLanguage ca .ca | AddLanguage es .es | AddLanguage sv .se | AddLanguage cz .cz | | <IfModule mod_negotiation.c> | LanguagePriority en de fr ar fa tr da nl et el it ja pl pt pt-br ltz ca es sv | </IfModule> | | #AddType application/x-httpd-php3 .php3 | #AddType application/x-httpd-php3-source .phps | # | # And for PHP 4.x, use: | # | AddType application/x-httpd-php .php | #AddType application/x-httpd-php-source .phps | | AddType application/x-tar .tgz | AddType image/bmp .bmp | AddType image/jpeg .jpg | | AddType text/x-hdml .hdml | | AddHandler cgi-script .cgi .sh .pl | | AddType text/html .shtml | AddHandler server-parsed .shtml | | #AddHandler send-as-is asis | #AddHandler imap-file map | #AddHandler type-map var | | </IfModule> | | AddDefaultCharset on | | #MetaDir .web | #MetaSuffix .meta | | # 1) plain text | #ErrorDocument 500 "The server made a boo boo. | # n.b. the (") marks it as text, it does not get output | # | # 2) local redirects | #ErrorDocument 404 /missing.html | # to redirect to local URL /missing.html | #ErrorDocument 404 /cgi-bin/missing_handler.pl | # N.B.: You can redirect to a script or a document using server-side-includes. | # | # 3) external redirects | #ErrorDocument 402 http://some.other_server.com/subscription_info.html | # N.B.: Many of the environment variables associated with the original | # request will *not* be available to such a script. | | | <IfModule mod_setenvif.c> | 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 | </IfModule> | | <IfModule mod_perl.c> | Alias /perl/ /var/www/perl/ | <Location /perl> | SetHandler perl-script | PerlHandler Apache::Registry | Options +ExecCGI | </Location> | </IfModule> | | #LoadModule put_module modules/mod_put.so | #Alias /upload /tmp | #<Location /upload> | # EnablePut On | # AuthType Basic | # AuthName Temporary | # AuthUserFile /etc/apache/passwd | # EnableDelete Off | # umask 007 | # <Limit PUT> | # require valid-user | # </Limit> | #</Location> | | <Location /server-status> | SetHandler server-status | Order deny,allow | Deny from all | Allow from .private.tamay-dogan.net | </Location> | | <Location /server-info> | SetHandler server-info | Order deny,allow | Deny from all | Allow from .private.tamay-dogan.net | </Location> | | #Alias /doc/ /usr/share/doc/ | | #<Location /doc> | # order deny,allow | # deny from all | # allow from all | # Options Indexes FollowSymLinks MultiViews | #</Location> | | #<Location /cgi-bin/phf*> | # Deny from all | # ErrorDocument 403 http://phf.apache.org/phf_abuse_log.cgi | #</Location> | | #<IfModule mod_proxy.c> | # ProxyRequests On | # <Directory proxy:*> | # Order deny,allow | # Deny from all | # Allow from .your_domain.com | # </Directory> | # ProxyVia On | # CacheRoot "/var/cache/apache" | # CacheSize 5 | # CacheGcInterval 4 | # CacheMaxExpire 24 | # CacheLastModifiedFactor 0.1 | # CacheDefaultExpire 1 | # NoCache a_domain.com another_domain.edu joes.garage_sale.com | #</IfModule> | | ### Section 3: Virtual Hosts | NameVirtualHost 192.168.1.10:80 | | Include /home/Configs/default.conf | | Include /home/Configs/vhosts/ \______________________________________________________________________ > Ist natürlich etwas überspitzt, aber prinzipiell triffts meiner Meinung > nach den Punkt. Nun frage ich mich, was Du am system verdrehen mußt ? > Ich werd wohl den nächsten Standard abwarten. So doll drückt der Schuh dann > doch noch nicht ;) SSL MUSS immer IPbase sein. Das wirste auch in Zukunft nicht ändern können. Und einen shttp auf ner dynamischen IP betreiben hat auch so gewisse probleme :-) > Danke für die Hilfe und Schöne Grüße > > Bastian Greetings Michelle -- Linux-User #280138 with the Linux Counter, http://counter.li.org/ Michelle Konzack Apt. 917 ICQ #328449886 50, rue de Soultz MSM LinuxMichi 0033/3/88452356 67100 Strasbourg/France IRC #Debian (irc.icq.com)
Attachment:
signature.pgp
Description: Digital signature