Discussion:
Apache2 does not enable htaccess
(too old to reply)
Gorka
2012-10-25 10:40:02 UTC
Permalink
I've put my .htaccess under /var/www with this lonely line ...

IndexIgnore *

... also there is in /etc/apache2/sites-available/default the following
content ...

<VirtualHost *:80>
ServerAdmin ***@localhost

DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

... As you can see, I've already changed AllowOverride from None to All
But .htaccess doesn't seem to work yet. When I point to the url it lists
the whole content of /var/www
What's the matter? Any idea?
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@yahoo.es
Gorka
2012-10-25 10:50:02 UTC
Permalink
Post by Gorka
I've put my .htaccess under /var/www with this lonely line ...
IndexIgnore *
... also there is in /etc/apache2/sites-available/default the
following content ...
<VirtualHost *:80>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
... As you can see, I've already changed AllowOverride from None to All
But .htaccess doesn't seem to work yet. When I point to the url it
lists the whole content of /var/www
What's the matter? Any idea?
I forgot to say that, of course, I've done ...

a2ensite default
/etc/init.d/apache2 reload (even restart)
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@yahoo.es
Lars Nooden
2012-10-25 10:50:02 UTC
Permalink
Post by Gorka
I've put my .htaccess under /var/www with this lonely line ...
IndexIgnore *
... also there is in /etc/apache2/sites-available/default the following
content ...
<VirtualHost *:80>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
... As you can see, I've already changed AllowOverride from None to All
But .htaccess doesn't seem to work yet. When I point to the url it lists the
whole content of /var/www
What's the matter? Any idea?
Put what you would have put inside .htaccess inside the appropriate
Directory directive inside the web server's configuration file. Remember
to reload. .htaccess is only for when you don't actually have write
access to the web server's configuration.

Regards,
/Lars
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@yeeloong.dhcp.inet.fi
Gorka
2012-10-25 11:20:02 UTC
Permalink
Post by Lars Nooden
Post by Gorka
I've put my .htaccess under /var/www with this lonely line ...
IndexIgnore *
... also there is in /etc/apache2/sites-available/default the following
content ...
<VirtualHost *:80>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
... As you can see, I've already changed AllowOverride from None to All
But .htaccess doesn't seem to work yet. When I point to the url it lists the
whole content of /var/www
What's the matter? Any idea?
Put what you would have put inside .htaccess inside the appropriate
Directory directive inside the web server's configuration file. Remember
to reload. .htaccess is only for when you don't actually have write
access to the web server's configuration.
Regards,
/Lars
Actually I'd like to be able to get it work so. There must be an
explanation for this, but I can't see what's wrong with the way I'm doing.
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@yahoo.es
Gorka
2012-10-25 12:30:02 UTC
Permalink
Post by Gorka
Post by Lars Nooden
Post by Gorka
I've put my .htaccess under /var/www with this lonely line ...
IndexIgnore *
... also there is in /etc/apache2/sites-available/default the following
content ...
<VirtualHost *:80>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
... As you can see, I've already changed AllowOverride from None to All
But .htaccess doesn't seem to work yet. When I point to the url it lists the
whole content of /var/www
What's the matter? Any idea?
Put what you would have put inside .htaccess inside the appropriate
Directory directive inside the web server's configuration file. Remember
to reload. .htaccess is only for when you don't actually have write
access to the web server's configuration.
Regards,
/Lars
Actually I'd like to be able to get it work so. There must be an
explanation for this, but I can't see what's wrong with the way I'm doing.
Just the same problem with ...

php_value upload_max_filesize 100M

... in .htaccess

phpinfo() keeps on showing ...

upload_max_filesize 2M 2M

... for both local and master. In fact phpinfo() only changes if I
change this value directly on php.ini, but I would like to know why my
.htaccess is not working. Any idea over there?
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@yahoo.es
Gorka
2012-10-26 06:40:02 UTC
Permalink
Post by Gorka
Post by Gorka
Post by Lars Nooden
Post by Gorka
I've put my .htaccess under /var/www with this lonely line ...
IndexIgnore *
... also there is in /etc/apache2/sites-available/default the following
content ...
<VirtualHost *:80>
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
... As you can see, I've already changed AllowOverride from None to All
But .htaccess doesn't seem to work yet. When I point to the url it lists the
whole content of /var/www
What's the matter? Any idea?
Put what you would have put inside .htaccess inside the appropriate
Directory directive inside the web server's configuration file. Remember
to reload. .htaccess is only for when you don't actually have write
access to the web server's configuration.
Regards,
/Lars
Actually I'd like to be able to get it work so. There must be an
explanation for this, but I can't see what's wrong with the way I'm doing.
Just the same problem with ...
php_value upload_max_filesize 100M
... in .htaccess
phpinfo() keeps on showing ...
upload_max_filesize 2M 2M
... for both local and master. In fact phpinfo() only changes if I
change this value directly on php.ini, but I would like to know why my
.htaccess is not working. Any idea over there?
Solved. By the time I created .htaccess file I was using Eclipse.
Eclipse aded the .php extension to the file and I didn't notice. Such a
big rookie mistake! I beg you pardon for the inconveniences. Thank you
anyway.
--
To UNSUBSCRIBE, email to debian-user-***@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact ***@lists.debian.org
Archive: http://lists.debian.org/***@yahoo.es
Continue reading on narkive:
Loading...