Page 1 of 1
apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 10:09
by recoilmaster
Hi !
Geht es das alle home/benutzername automatisch als subdomain angelegt werden.
z.b die Domain ist lalala.com
der User /home/lucky
dann die Subdomain lalala.com/lucky
Hier der Auszug aus der httpd.conf
Code: Select all
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
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 SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
DirectoryIndex index.html
</Directory>
#
# 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 *>
ServerAdmin webmaster@*****.**********.de
DocumentRoot /usr/local/apache2/htdocs/
ServerName *****.**********.de
ErrorLog logs/*****.**********.de-error_log
CustomLog logs/*****.**********.de-access_log common
UserDir public_html
<Directory "/home/*/public_html">
</Directory>
</VirtualHost>
Hat einer eine Idee ?
Danke
Bye Keule
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 10:47
by jtb
Wie wäre es mit mod_rewrite?
Oder mod_vhost_alias?
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 11:35
by recoilmaster
muss ich die module mitcompilen ? oder sind die standartmässig schon dabei ?
Danke für die Hilfe
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 11:38
by recoilmaster
Hab das vhost alias modul gefunden das rewrite aleerdings nich *_*
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 11:42
by jtb
äähm, ich dachte jetzt, dass es wahrscheinlicher wäre, dass du mod_rewrite findest als mod_vhost_alias...
Wie sieht dein Apache aus?
mach mal ein httpd -Vl
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 11:46
by recoilmaster
Code: Select all
linux:/usr/local/apache2/bin # ./httpd -Vl
Server version: Apache/2.0.47
Server built: Sep 23 2003 00:27:09
Server's Module Magic Number: 20020903:4
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT="/usr/local/apache2"
-D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 11:47
by recoilmaster
hmm hab das modul in webmin gefunden nach der konfiguration ists aber nicht da. Ist also wohl doch nicht installier :/
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 12:12
by jtb
sorry, einmal httpd -V (hast du ja schon) und einmal httpd -l
Wusste nicht, dass Apache beides gleichzeitig nicht macht..
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 12:26
by recoilmaster
Code: Select all
linux:/usr/local/apache2/bin # ./httpd -l
Compiled in modules:
core.c
mod_access.c
mod_auth.c
mod_include.c
mod_log_config.c
mod_env.c
mod_setenvif.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_so.c
nicht dabei.
Wie bekomm ich die 2 Module jetzt dazu ?!?
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 12:27
by jtb
ok, selbst kompiliert?
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 12:28
by recoilmaster
ja
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 12:30
by jtb
ok, guck dir
http://httpd.apache.org/docs-2.0/install.html mal an..
ein ./configure --help sollte helfen
btw: Ich würde mod_rewrite vorziehen
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 12:35
by recoilmaster
kann ich einfach so übers alte apache drüber installieren ?
Danke
Bye Keule
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 12:40
by jtb
mach vorher ein Backup von /usr/local/apache und stoppe den Apache.. Dann sollte es funktionieren.
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 12:53
by recoilmaster
Ok Module sind drinnen.
Was muss noch in die .conf ?
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 18:00
by jtb
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 18:37
by Joe User
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 19:57
by recoilmaster
Code: Select all
#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.
#
UserDir /home/*/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 SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
DirectoryIndex index.html
</Directory>
<Directory /home/*/cgi-bin/>
Options ExecCGI
SetHandler cgi-script
</Directory>
mit den Einstellungen geht domain/~username nicht
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 20:21
by Joe User
habe gerade Folgendes beim Stöbern entdeckt:
http://www.snert.com/Software/mod_vd/index.shtml
Dürfte eigendlich Deinen Anforderungen gerecht werden ;)
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 23:01
by recoilmaster
Danke leuft nun.
Bekommt man auch die ~ vor dem Usernamen irgendwie weg ?
Bye Keule
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 23:05
by Joe User
Recoilmaster wrote:Bekommt man auch die ~ vor dem Usernamen irgendwie weg ?
http://httpd.apache.org/docs-2.0/howto/public_html.html
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-22 23:07
by recoilmaster
da steht nix davon *_*
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-23 00:10
by Joe User
Re: apache2 - /home/*/public_html als subdomain
Posted: 2003-10-23 11:27
by recoilmaster
geht danke !