Difference between revisions of "Apache"

From Linuxintro
imported>ThorstenStaerk
(New page: = WebDAV unter Apache2 = Bei Apache2 ist das DAV-Modul bereits onboard. Die Aktivierung der beiden benoetigten Module "dav_fs" und "dav" geschieht ueber "a2enmod". Danach "/etc/init.d/apac...)
 
imported>ThorstenStaerk
Line 1: Line 1:
= WebDAV unter Apache2 =
+
Apache is a popular http daemon. In other words it is the software for web servers.
Bei Apache2 ist das DAV-Modul bereits onboard. Die Aktivierung der beiden
 
benoetigten Module "dav_fs" und "dav" geschieht ueber "a2enmod".
 
Danach "/etc/init.d/apache force-restart" ausfuehren.
 
  
In /etc/apache2/mods-available/dav_fs.conf sollte was aehnliches stehen wie:
+
= WebDAV under Apache2 =
DAVLockDB /var/lock/apache2/DAVLock
+
With Apache2, the DAV module is already included. You will need to activate the two needed modules dav_fs and dav using a2enmod. Afterwards, restart apache using
 +
/etc/init.d/apache2 force-restart
  
Der Benutzer-Account, unter dem Apache laeuft (www-data), benoetigt Lese- und
+
In /etc/apache2/mods-available/dav_fs.conf you should find something like:
Schreibrechte in diesem Verzeichnis.
+
DAVLockDB /var/lock/apache2/DAVLock
  
Eintragen in /etc/apache2/apache2.conf:
+
The user-account Apache is running under (www or www-data) needs read-and write privileges in this folder.
Alias /daten /var/data
 
<Directory /var/data/>
 
DAV On
 
ForceType text/plain
 
AuthType Basic
 
AuthName "WebDAV Daten"
 
AuthUserFile /etc/apache2/htpasswd
 
Require valid-user
 
</Directory>
 
  
Erstellen des Verzeichnisses "/var/data" mit "chown www-data:www-data /var/data"
+
Enter into /etc/apache2/apache2.conf:
 +
Alias /daten /var/data
 +
<Directory /var/data/>
 +
DAV On
 +
ForceType text/plain
 +
AuthType Basic
 +
AuthName "WebDAV Daten"  
 +
AuthUserFile /etc/apache2/htpasswd
 +
Require valid-user
 +
</Directory>
  
Der ERSTE Benutzer wird erstellt mit:
+
Create "/var/data" and issue
htpasswd -c /etc/apache2/htpasswd benutzername
+
chown www-data:www-data /var/data
Bei weiteren laesst man einfach das -c weg (create).
 
  
 +
Create the FIRST user with:
 +
htpasswd -c /etc/apache2/htpasswd benutzername
 +
For further users, leave out the -c (create).
  
 
+
= switch off Apache - Directory-Listing =
= Apache - Directory-Listing abschalten =
+
Remove
Bei den Options von /var/www das Indexes rausnehmen, dann wird der Inhalt
+
Indexes  
von Verzeichnissen nicht mehr aufgelistet.
+
from the options, then the content of the folders will no longer be shown.
 
 
  
 
= Alias =
 
= Alias =

Revision as of 08:53, 10 September 2011

Apache is a popular http daemon. In other words it is the software for web servers.

WebDAV under Apache2

With Apache2, the DAV module is already included. You will need to activate the two needed modules dav_fs and dav using a2enmod. Afterwards, restart apache using

/etc/init.d/apache2 force-restart

In /etc/apache2/mods-available/dav_fs.conf you should find something like:

DAVLockDB /var/lock/apache2/DAVLock

The user-account Apache is running under (www or www-data) needs read-and write privileges in this folder.

Enter into /etc/apache2/apache2.conf:

Alias /daten /var/data
<Directory /var/data/>
DAV On
ForceType text/plain
AuthType Basic 
AuthName "WebDAV Daten" 
AuthUserFile /etc/apache2/htpasswd 
Require valid-user 
</Directory>

Create "/var/data" and issue

chown www-data:www-data /var/data

Create the FIRST user with:

htpasswd -c /etc/apache2/htpasswd benutzername

For further users, leave out the -c (create).

switch off Apache - Directory-Listing

Remove

Indexes 

from the options, then the content of the folders will no longer be shown.

Alias

An alias allows you to point a URL to a file like this:

Alias /skins /srv/www/htdocs/skins

Imagine we have a home page www.myhomepage.com and have a mediawiki running on it. The URL http://myhomepage.com/skins would now be processed by mediawiki. But we want it to contain pure files. So we make this alias.