You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Robert Nicholson <ro...@elastica.com> on 2005/03/03 23:46:44 UTC
[users@httpd] virtual hosts problems... .htaccess rule strangeness.
Hi folks,
If I put RewriteLog in my .htaccess file apache complains that it
shouldn't there.
Is that a good way of knowing whether or not .htaccess is enabled via
AllowOverride or not?
ie. if AllowOverride is None will Apache still complain about things
that aren't approrpriate for .htaccess
I'm trying to setup a simple rewrite rule on the top level of my web
site thus
bash$ cat .htaccess
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^/$ /weblog [r=301,nc]
...
I'm governed by the following AllowOverrides
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
AllowOverride None
<Directory "/home/httpd/vhosts">
AllowOverride All
Options SymLinksIfOwnerMatch
Order allow,deny
Allow from all
php_admin_flag engine off
</Directory>
<VirtualHost \
XX.XX.XX.XX:80 \
>
ServerName default
UseCanonicalName Off
DocumentRoot /home/httpd/vhosts/default/htdocs
ScriptAlias /cgi-bin/ "/home/httpd/vhosts/default/cgi-bin/"
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
<Directory "/home/httpd/vhosts/default/cgi-bin/">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
This is the rule that defines my host.
What I want to know is whether or not AllowOverride allows me to use
.htaccess or not.
Does the <Directory "/home/httpd/vhosts"> override the top level
AllowOverride None or not?
<VirtualHost XX.XX.XX.XX:80>
ServerName elastica.com:80
ServerAlias www.elastica.com
UseCanonicalName Off
SuexecUserGroup elastica psacln
ServerAdmin "robert@elastica.com"
DocumentRoot /home/httpd/vhosts/elastica.com/httpdocs
CustomLog
/home/httpd/vhosts/elastica.com/statistics/logs/access_log combined
ErrorLog
/home/httpd/vhosts/elastica.com/statistics/logs/error_log
<IfModule mod_userdir.c>
UserDir /home/httpd/vhosts/elastica.com/web_users
</IfModule>
ScriptAlias /cgi-bin/ /home/httpd/vhosts/elastica.com/cgi-bin/
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
<Directory /home/httpd/vhosts/elastica.com/httpdocs>
<IfModule sapi_apache2.c>
php_admin_flag engine off
</IfModule>
Options -Includes +ExecCGI
</Directory>
</VirtualHost>
---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
[users@httpd] VirtualHost 216.55.162.34:80
Posted by Amin Thakkar <am...@infopoint.co.ug>.
Hi
Still I have problem in Virtucal Host. When ever I am creating subdomain
then it is writing scripts in httpd.include as below
<VirtualHost 216.55.162.34:80>
ServerName stjohnsw.thinkquestuganda.org:80
SuexecUserGroup thinkque psacln
ServerAdmin amin@computerland.co.ug
DocumentRoot
/home/httpd/vhosts/thinkquestuganda.org/subdomains/stjohnsw/httpdocs
CustomLog /home/httpd/vhosts/thinkquestuganda.org/statistics/logs/access_log
combined
ErrorLog /home/httpd/vhosts/thinkquestuganda.org/statistics/logs/error_log
ScriptAlias /cgi-bin/
/home/httpd/vhosts/thinkquestuganda.org/subdomains/stjohnsw/cgi-bin/
<IfModule mod_ssl.c>
Now I want when I create subdomain it should create scripts as below;
<VirtualHost 216.55.162.34:80>
ServerName stjohnsw.thinkquestuganda.org:80
ServerAlias www.stjohnsw.thinkquestuganda.org
SuexecUserGroup thinkque psacln
ServerAdmin amin@computerland.co.ug
DocumentRoot
/home/httpd/vhosts/thinkquestuganda.org/subdomains/stjohnsw/httpdocs
CustomLog /home/httpd/vhosts/thinkquestuganda.org/statistics/logs/access_log
combined
ErrorLog /home/httpd/vhosts/thinkquestuganda.org/statistics/logs/error_log
ScriptAlias /cgi-bin/
/home/httpd/vhosts/thinkquestuganda.org/subdomains/stjohnsw/cgi-bin/
<IfModule mod_ssl.c>
What to do so scripts will work fine.
Thank you,
Regards
Amin
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.5.1 - Release Date: 27-Feb-2005
---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: [users@httpd] virtual hosts problems... .htaccess rule strangeness.
Posted by Joshua Slive <js...@gmail.com>.
On Thu, 3 Mar 2005 16:46:44 -0600, Robert Nicholson <ro...@elastica.com> wrote:
> If I put RewriteLog in my .htaccess file apache complains that it
> shouldn't there.
RewriteLog is never allowed in .htaccess files, as you can see from
the "Context" line here:
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html#rewritelog
>
> Is that a good way of knowing whether or not .htaccess is enabled via
> AllowOverride or not?
>
> ie. if AllowOverride is None will Apache still complain about things
> that aren't approrpriate for .htaccess
No. If AllowOverride is None, then apache will never even read the
.htaccess files.
> bash$ cat .htaccess
> Options +FollowSymLinks
> RewriteEngine On
> RewriteBase /
> RewriteRule ^/$ /weblog [r=301,nc]
You probably want to replace ^/$ with simply ^$ given that you are
operating in an .htaccess file.
> What I want to know is whether or not AllowOverride allows me to use
> .htaccess or not.
Yes, it does.
>
> Does the <Directory "/home/httpd/vhosts"> override the top level
> AllowOverride None or not?
Yes, it does.
Joshua.
---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org