Idézet: Ndrew - Dátum: 2006. júl. 17., hétfő - 19:40
Hátha itt kapok választ:
Üdv!
Nagyon
vagyok még linux témához, de igyekszem.
Telepítettem apach szervert suse 10.1 alá, frankón működik is. Azt hogyan lehetne elérni, hogy a felhasználók public_html mappája is elérhető legyen?
pl.: localhost/~felhasználónév/
Szerk.: Esetleg aldomaineket, hogy lehet beállítani?
Köszönöm!
Na lássuk. A userdirekhez egy ilyet kellene betenni a configba (/etc/apace/httpd.conf vagy hasonló, nem tudom, suse alatt hol lakik)
<IfModule mod_userdir.c>
UserDir public_html
#
# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<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>
De ez ált benne szokott lenni, szal kell még a modules.conf -ba valami ilyesmi:
LoadModule userdir_module /usr/lib/apache/1.3/mod_userdir.so
Persze az útvonal vaszínű neked más.
Aldomainek.
Ehhez egyrészt ugye be kell őket jegyezni a dnsbe, hogy az összes xyz.tedomained.hu az adott gép ipjére oldódjon, utána pedig a httpd.confban kell virtual hostokat definiálni, valami hasonló módon:
### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them.
# Please see the documentation at <URL:http://www.apache.org/docs/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.
#
# If you want to use name-based virtual hosts you need to define at
# least one IP address (and port number) for them.
#
#NameVirtualHost 12.34.56.78:80
#NameVirtualHost 12.34.56.78
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
#
#<VirtualHost ip.address.of.host.some_domain.com>
# ServerAdmin webmaster@host.some_domain.com
# DocumentRoot /www/docs/host.some_domain.com
# ServerName host.some_domain.com
# ErrorLog logs/host.some_domain.com-error.log
# CustomLog logs/host.some_domain.com-access.log common
#</VirtualHost>
#<VirtualHost _default_:*>
#</VirtualHost>
Ahol a ServerName alapján vonatkoznak az egyes virtual host beállítások az aldomainekre.