Inhaltverzeichnis anlegen

Alles, was den Apache betrifft, kann hier besprochen werden.

Inhaltverzeichnis anlegen

Postby compiman79 » 30. May 2005 17:20

Hallo, bin grade dabei mir oder einem Kolegen in seinem Bereich seines VWebserver ein Inhaltverzeichnis oder Downloadbereich einzurichten. Habe hier auch ein schönes Buch wonach ich das auch schon mal ohne probleme hinbekommen habe, aber bei meinem jetzigen Apache2 war schon alles voreingestellt und ich wollte das dann nur noch dazu setzen. Habe schon mal geschaut hier aber denke das ich mit dem Betriebssystem fast alleine bin.

Hier mal mein httpd.conf

Code: Select all
ServerTokens OS

ServerRoot "/etc/httpd"

PidFile run/httpd.pid

Timeout 300

KeepAlive Off

MaxKeepAliveRequests 100

KeepAliveTimeout 15

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
MaxClients       150
MaxRequestsPerChild  1000
</IfModule>

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


Listen 80
Listen 90
Listen 100
Listen 130
Listen 120


LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.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 unique_id_module modules/mod_unique_id.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 asis_module modules/mod_asis.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 imap_module modules/mod_imap.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_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 asterisk
Group asterisk

ServerAdmin root@localhost

UseCanonicalName Off

DocumentRoot "/var/www/html"

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

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

<IfModule mod_userdir.c>
    UserDir disable
</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 /usr/share/magic.mime
    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 Off

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

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

#Password protect /var/www/html/admin

<Directory /var/www/html/admin>
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /usr/local/apache/passwd/wwwpasswd
Require user wwwadmin maint
</Directory>

#Password protect /var/www/html/maint

<Directory /var/www/html/maint>
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /usr/local/apache/passwd/wwwpasswd
Require user maint
</Directory>

#Password protect /var/www/html/meetme

<Directory /var/www/html/meetme>
AuthType Basic
AuthName "Restricted Area"
AuthUserFile /usr/local/apache/passwd/wwwpasswd
Require user meetme maint
</Directory>

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

##ForceLanguagePriority Prefer Fallback##

AddDefaultCharset UTF-8
AddCharset ISO-8859-1  .iso8859-1  .latin1
AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
AddCharset ISO-8859-3  .iso8859-3  .latin3
AddCharset ISO-8859-4  .iso8859-4  .latin4
AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb
AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
AddCharset ISO-2022-JP .iso2022-jp .jis
AddCharset ISO-2022-KR .iso2022-kr .kis
AddCharset ISO-2022-CN .iso2022-cn .cis
AddCharset Big5        .Big5       .big5
# For russian, more than one charset is used (depends on client, mostly):
AddCharset WINDOWS-1251 .cp-1251   .win-1251
AddCharset CP866       .cp866
AddCharset KOI8-r      .koi8-r .koi8-ru
AddCharset KOI8-ru     .koi8-uk .ua
AddCharset ISO-10646-UCS-2 .ucs2
AddCharset ISO-10646-UCS-4 .ucs4
AddCharset UTF-8       .utf8
AddCharset GB2312      .gb2312 .gb
AddCharset utf-7       .utf7
AddCharset utf-8       .utf8
AddCharset big5        .big5 .b5
AddCharset EUC-TW      .euc-tw
AddCharset EUC-JP      .euc-jp
AddCharset EUC-KR      .euc-kr
AddCharset shift_jis   .sjis
AddType application/x-tar .tgz
AddHandler imap-file map
AddHandler type-map var
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 "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
BrowserMatch "^gnome-vfs" redirect-carefully

##########>>>>---VIRTUALE MASCHINEN---<<<<###########

####>>>>ASTERISK<<<<####

NameVirtualHost 192.168.1.25:80   

<VirtualHost 192.168.1.25:80>
   DocumentRoot /var/www/html
   ServerName 192.168.1.25:80
</VirtualHost>

####>>>>MATTHIAS<<<<####

NameVirtualHost 192.168.1.25:90   

<VirtualHost 192.168.1.25:90>
    DocumentRoot /var/www/matthias
    ServerName 192.168.1.25:90
</VirtualHost>

####>>>>THOMAS<<<<####

NameVirtualHost 192.168.1.25:100   

<VirtualHost 192.168.1.25:100>
   DocumentRoot /var/www/thomas
   ServerName 192.168.1.25:100
   IndexOptions FancyIndexing
   ReadmeName readme.html
   HeaderName header.html
   
</VirtualHost>

####>>>>NASTASSJA<<<<####

NameVirtualHost 192.168.1.25:130   

<VirtualHost 192.168.1.25:130>
   DocumentRoot /var/www/nastassja
   ServerName 192.168.1.25:130
</VirtualHost>

####>>>>RENE<<<<####

NameVirtualHost 192.168.1.25:120   

<VirtualHost 192.168.1.25:120>
   DocumentRoot /var/www/rene
   ServerName 192.168.1.25:120
</VirtualHost>


Der Rechner kommt bald in ein RechenZentrum und alle nutzer bekommen eine eigene IP.
Betriebssystem: Ubuntu 7.10 mit Apache2
compiman79
 
Posts: 9
Joined: 30. May 2005 17:10
Location: Hamburg

Postby Wiedmann » 30. May 2005 17:44

Habe schon mal geschaut hier aber denke das ich mit dem Betriebssystem fast alleine bin.

:?:

Hallo, bin grade dabei mir oder einem Kolegen in seinem Bereich seines VWebserver ein Inhaltverzeichnis oder Downloadbereich einzurichten.

zuständig ist dafür "mod_autoindex". Das Apache-Manual solltre dir dazu alles nötige verraten.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby compiman79 » 30. May 2005 18:39

Das erste soll heißen das ich hier schon mal durchgesucht habe ob es eine lösung für mein problem schon gibt. Aber habe nicht in meinen fall mit Asterisk@Home gefunden!

Und mod_autoindex habe ich ja drin und auch mod_alias so wie es in dem Markt und Technik Buch steht auch. Halt so wie ich das schon mal gemacht habe mit aber einem nacktem Apache. Aber dieses kann ich nicht so einfach nackt machen weil dann das AMP nicht geht.

Aber werde mal dort nachschauen.
Betriebssystem: Ubuntu 7.10 mit Apache2
compiman79
 
Posts: 9
Joined: 30. May 2005 17:10
Location: Hamburg

Postby compiman79 » 30. May 2005 18:59

Kennt vieleicht einer eine gute deutsche seite über Apache?
Betriebssystem: Ubuntu 7.10 mit Apache2
compiman79
 
Posts: 9
Joined: 30. May 2005 17:10
Location: Hamburg

Postby Wiedmann » 30. May 2005 19:15

Das erste soll heißen das ich hier schon mal durchgesucht habe ob es eine lösung für mein problem schon gibt. Aber habe nicht in meinen fall mit Asterisk@Home gefunden!

Dein Problem gab's hier schon ein paar Mal.
Keine Ahnung was "Asterisk@Home" sein soll. Ist aber unerheblich, da der Apache immer gleich konfiguriert wird.

Und mod_autoindex habe ich ja drin und auch mod_alias so wie es in dem Markt und Technik Buch steht auch.

"mod_autoindex" wird bei dir geladen, stimmt. Nur was für deine automatische Verzeichnisauflistung noch nötig ist fehlt. Das kann man aber im Manual nachlesen.

Kennt vieleicht einer eine gute deutsche seite über Apache?

Das Manual ist leider nicht komplett übersetzt. "mod_autoindex" z.B. nicht. Die für dich noch interessante Seite über die "Options" gibt es aber auf deutsch.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby deepsurfer » 30. May 2005 19:15

http://aktuell.de.selfhtml.org/artikel/ ... f12.htm#a1
Es wurde hier versucht die komplette HTTPD.CONF in Deutsche zu Übersetzen. Und deren Befehle verständlich rüber zu geben.

Ansonsten ist und bleibt http://apache.org die einzigste Anlaufpage für den Apachen und mit der Übersetzung bei denen wird es von Tag zu Tag auch immer besser.
chirio Deep
Wie sagte einst der MCP aus Tron auf dem Bildschirm zu schreiben Pflegte
" ... end of communication ... "
User avatar
deepsurfer
AF Moderator
 
Posts: 6440
Joined: 23. November 2004 10:44
Location: Cologne
Operating System: Win-XP / Win7 / Linux -Debian

Postby compiman79 » 30. May 2005 20:36

Muss jetzt mal frech fragen, weil kenne das aus meinem VoIP Forum ganz anders. Klar ist man es leit, kenne es auch selber, aber wenn man schon fragt das man nichts dazu findet und man auch die ganze conf reinsetzt könnte man doch wenn man das weiß was der fehler ist was es ist. Hoffe man kann das verstehen. Soll auch kein angriff sein aber schreibe selber viel in einem Forum und da ist das ganze etwas anders.

Würde mich ja nur über eine lösung freuen, da ich nicht so im englischen auskenne komme ich da leider nicht mit weiter. Bin nicht zu fauel selbst was zu lesen oder zu suchen habe hier schon ein ganzes Apachebuch gelesen und versucht das zu lösen.

OK soll also ehrlich kein angriff sein!
Betriebssystem: Ubuntu 7.10 mit Apache2
compiman79
 
Posts: 9
Joined: 30. May 2005 17:10
Location: Hamburg

Postby compiman79 » 30. May 2005 22:33

So habe jetzt noch mal " Options Indexes " dazu gesetzt und es macht sich immer noch nichts es kommt immer der Fehlercode 403 Verboten.
Betriebssystem: Ubuntu 7.10 mit Apache2
compiman79
 
Posts: 9
Joined: 30. May 2005 17:10
Location: Hamburg

Postby Wiedmann » 30. May 2005 22:42

So habe jetzt noch mal " Options Indexes " dazu gesetzt

- Wo?
- Was hast du denn bisher genau konfiguriert für das Downloadverzeichnis
- Um welches physikalisches Verzeichnis geht es?
- Welche URI soll dieses Verzeichnis haben?
- Für welchen VHost soll diese Konfiduration gültig sein (oder für alle)?
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby compiman79 » 30. May 2005 22:51

Bringt es was wenn ich noch mal meine jetzteige httpd.conf reinsetze?

1.Habe das Options Indexes in den Vhost mit reingesetzt!

2.####>>>>THOMAS<<<<####

Code: Select all
NameVirtualHost 192.168.1.25:100   

<VirtualHost 192.168.1.25:100>
   DocumentRoot /var/www/thomas
   ServerName 192.168.1.25:100
   Options +Indexes
   IndexOptions FancyIndexing VersionSort
   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
</VirtualHost>


3. /thomas/download

4. 192.168.1.25:100

5.nein nur für eins, in dem fall THOMAS
Betriebssystem: Ubuntu 7.10 mit Apache2
compiman79
 
Posts: 9
Joined: 30. May 2005 17:10
Location: Hamburg

Postby Wiedmann » 30. May 2005 23:20

Also im einfachsten Fall müsste das so aussehen:

zu 2)
Code: Select all
NameVirtualHost 192.168.1.25:100

<VirtualHost 192.168.1.25:100>
   DocumentRoot /var/www/thomas
   ServerName 192.168.1.25:100

   <Directory /var/www/thomas>
      AllowOverride None
      Order Allow,Deny
      Allow from all
   </Directory>

   <Directory /var/www/thomas/download>
      Options +Indexes
   </Directory>
</VirtualHost>


zu 3)
der physikalische Pfad wäre hier:
/var/www/thomas/download

zu 4)
die URI dazu wäre:
http://192.168.1.25:100/download
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby compiman79 » 30. May 2005 23:32

Wo muss ich hinkommen um dir die füsse zu küssen? Danke Danke und noch mals Danke!!

Geht jetzt!!
Betriebssystem: Ubuntu 7.10 mit Apache2
compiman79
 
Posts: 9
Joined: 30. May 2005 17:10
Location: Hamburg


Return to Apache

Who is online

Users browsing this forum: No registered users and 103 guests