> -----Original Message-----
> From: Chris Arnold [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 13, 2007 7:16 PM
> To: users@httpd.apache.org
> Subject: Re: [EMAIL PROTECTED] domain.com/~user -> user.domain.com
> 
> 
> I have a vhost like this also (does not work):

You should fix you VH config before worrying about mod_rewrite. 

I'm guessing "does not work" in this context means that you get the
"main page" which, guessing again, is a page defined by a DocumentRoot
directive outside the VirtualHost (ie, probably the doc root you had
before you tried virtual hosting).

If so, you probably don't have a NameVirtualHost directive. Put
"NameVirtualHost *:80" before the first <VirtualHost> container and try
again. Also, read
http://httpd.apache.org/docs/2.2/vhosts/name-based.html esp. "Main host
goes away".

If not, then please explain exactly what is happening.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 




> <VirtualHost *:80>
>     ServerAdmin [EMAIL PROTECTED]
>     ServerName user.domain.tld
>     DocumentRoot /home/<user>/public_html/
> 
>     # if not specified, the global error log is used
>     ErrorLog /var/log/apache2/user.domain.tld-error_log
>     CustomLog /var/log/apache2/user.domain.tld-access_log combined
> 
>     # don't loose time with IP address lookups
>     HostnameLookups Off
> 
>     # needed for named virtual hosts
>     UseCanonicalName Off
> 
>     # configures the footer on server-generated documents
>     ServerSignature On
> 
> 
>     # Optionally, include *.conf files from /etc/apache2/conf.d/
>     #
>     # For example, to allow execution of PHP scripts:
>     #
>     # Include /etc/apache2/conf.d/mod_php4.conf
>     #
>     # or, to include all configuration snippets added by packages:
>     # Include /etc/apache2/conf.d/*.conf
> 
> 
>     # ScriptAlias: This controls which directories contain 
> server scripts.
>     # ScriptAliases are essentially the same as Aliases, except that
>     # documents in the realname directory are treated as 
> applications and
>     # run by the server when requested rather than as 
> documents sent to the client.
>     # The same rules about trailing "/" apply to ScriptAlias 
> directives as to
>     # Alias.
>     #
>     ScriptAlias /cgi-bin/ 
> "/srv/www/vhosts/dummy-host.example.com/cgi-bin/"
> 
>     # "/srv/www/cgi-bin" should be changed to whatever your 
> ScriptAliased
>     # CGI directory exists, if you have one, and where 
> ScriptAlias points to.
>     #
>     <Directory "/srv/www/vhosts/dummy-host.example.com/cgi-bin">
>       AllowOverride None
>       Options +ExecCGI -Includes
>       Order allow,deny
>       Allow from all
>     </Directory>
> 
> 
>     # UserDir: The name of the directory that is appended 
> onto a user's home
>     # directory if a ~user request is received.
>     #
>     # To disable it, simply remove userdir from the list of 
> modules in APACHE_MODULES
>     # in /etc/sysconfig/apache2.
>     #
>     <IfModule mod_userdir.c>
>       # Note that the name of the user directory 
> ("public_html") cannot simply be
>       # changed here, since it is a compile time setting. The 
> apache package
>       # would have to be rebuilt. You could work around by deleting
>       # /usr/sbin/suexec, but then all scripts from the 
> directories would be
>       # executed with the UID of the webserver.
>       UserDir public_html
>       # The actual configuration of the directory is in
>       # /etc/apache2/mod_userdir.conf.
>       Include /etc/apache2/mod_userdir.conf
>       # You can, however, change the ~ if you find it 
> awkward, by mapping e.g.
>       # http://www.example.com/users/karl-heinz/ --> 
> /home/karl-heinz/public_html/
>       #AliasMatch ^/users/([a-zA-Z0-9-_.]*)/?(.*) 
> /home/$1/public_html/$2
>     </IfModule>
> 
> 
>     #
>     # This should be changed to whatever you set DocumentRoot to.
>     #
>     <Directory "/home/<user>/public_html/">
>     
>       #
>       # Possible values for the Options directive are "None", "All",
>       # or any combination of:
>       #   Indexes Includes FollowSymLinks 
> SymLinksifOwnerMatch ExecCGI MultiViews
>       #
>       # Note that "MultiViews" must be named *explicitly* --- 
> "Options All"
>       # doesn't give it to you.
>       #
>       # The Options directive is both complicated and 
> important.  Please see
>       # http://httpd.apache.org/docs-2.2/mod/core.html#options
>       # for more information.
>       #
>       Options Indexes FollowSymLinks
>     
>       #
>       # AllowOverride controls what directives may be placed 
> in .htaccess files.
>       # It can be "All", "None", or any combination of the keywords:
>       #   Options FileInfo AuthConfig Limit
>       #
>       AllowOverride None
>     
>       #
>       # Controls who can get stuff from this server.
>       #
>       Order allow,deny
>       Allow from all
>     
>     </Directory>
> 
> </VirtualHost>
> 
> Chris
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. No confidentiality or privilege 
is waived or lost by any mistransmission. If you receive this message in error, 
please notify the sender urgently and then immediately delete the message and 
any copies of it from your system. Please also immediately destroy any 
hardcopies of the message. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. The sender's company reserves the right to monitor all e-mail 
communications through their networks. Any views expressed in this message are 
those of the individual sender, except where the message states otherwise and 
the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to