apache2 - /home/*/public_html als subdomain

Apache, Lighttpd, nginx, Cherokee
Post Reply
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

apache2 - /home/*/public_html als subdomain

Post 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
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post by jtb »

Wie wäre es mit mod_rewrite?
Oder mod_vhost_alias?
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post by recoilmaster »

muss ich die module mitcompilen ? oder sind die standartmässig schon dabei ?

Danke für die Hilfe
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post by recoilmaster »

Hab das vhost alias modul gefunden das rewrite aleerdings nich *_*
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post 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
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post 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"
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post by recoilmaster »

hmm hab das modul in webmin gefunden nach der konfiguration ists aber nicht da. Ist also wohl doch nicht installier :/
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post by jtb »

sorry, einmal httpd -V (hast du ja schon) und einmal httpd -l

Wusste nicht, dass Apache beides gleichzeitig nicht macht..
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post 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 ?!?
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post by jtb »

ok, selbst kompiliert?
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post by recoilmaster »

ja
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post 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
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post by recoilmaster »

kann ich einfach so übers alte apache drüber installieren ?

Danke

Bye Keule
jtb
Posts: 599
Joined: 2002-08-18 16:41
Location: Darmstadt
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post by jtb »

mach vorher ein Backup von /usr/local/apache und stoppe den Apache.. Dann sollte es funktionieren.
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post by recoilmaster »

Ok Module sind drinnen.

Was muss noch in die .conf ?
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post by Joe User »

recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post 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
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post 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 ;)
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post by recoilmaster »

Danke leuft nun.

Bekommt man auch die ~ vor dem Usernamen irgendwie weg ?

Bye Keule
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post 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
recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post by recoilmaster »

da steht nix davon *_*
User avatar
Joe User
Project Manager
Project Manager
Posts: 11191
Joined: 2003-02-27 01:00
Location: Hamburg
Contact:
 

Re: apache2 - /home/*/public_html als subdomain

Post by Joe User »

recoilmaster
Posts: 188
Joined: 2003-10-02 10:35
 

Re: apache2 - /home/*/public_html als subdomain

Post by recoilmaster »

geht danke !
Post Reply