Hi,
New, working, install of openSUSE 12.1 (x86_64). I have a CentOS background.
Problem: .htaccess isn’t being processed (mod_rewrite gives 404).
Tried: Everything available
SDB:Linux Apache MySQL PHP - openSUSE
Enable mod_rewrite Apache 2.0 rewrite module on SuSE Linux | enarion.net
Enable mod_rewrite for OpenSuse 12.1
(w/ multiple reboots for good measure)
phpinfo() shows:
Loaded Modules core prefork http_core mod_so mod_actions mod_alias mod_auth_basic mod_authn_file mod_authz_host mod_authz_groupfile mod_authz_default mod_authz_user mod_autoindex mod_cgi mod_dir mod_env mod_expires mod_include mod_log_config mod_mime mod_negotiation mod_setenvif mod_ssl mod_userdir mod_php5 mod_deflate mod_rewrite
/etc/apache2/default-server.conf:
<Directory "/srv/www/htdocs">
# 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 All
# 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 ALL
# Controls who can get stuff from this server.
Order allow,deny
Allow from all
</Directory>
Standard v.hosts conf files. (default pasted below)
http://phpmyadmin.localhost/ - works perfectly (doesn’t use .htaccess)
http://books.localhost/ - loads base Drupal install
http://books.localhost/user/register - 404s
Using the example at: Enable mod_rewrite Apache 2.0 rewrite module on SuSE Linux | enarion.net
http://localhost/ - loads “It works!”
http://localhost/user/something - 404s
localhost .htaccess
Options +FollowSymlinks
RewriteEngine on
#RewriteBase /
RewriteRule user/(.*)$ /user.php?user=$1
#
Logs just show 404s.
I’m used to CentOS, where the default Apache config “just works”, so, what am I missing?
Thanks,
Michael
00-default.conf
#
# VirtualHost template
# Note: to use the template, rename it to /etc/apache2/vhost.d/yourvhost.conf.
# Files must have the .conf suffix to be loaded.
#
# See /usr/share/doc/packages/apache2/README.QUICKSTART for further hints
# about virtual hosts.
#
# NameVirtualHost statements can be added to /etc/apache2/listen.conf.
#
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName localhost
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
DocumentRoot /srv/www/htdocs/vhosts/localhost
# if not specified, the global error log is used
ErrorLog /var/log/apache2/localhost-error_log
CustomLog /var/log/apache2/localhost-access_log combined
# don't loose time with IP address lookups
HostnameLookups Off
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/srv/www/htdocs/vhosts/localhost">
#
# 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 All
#
# 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 All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
httpd.conf.local
RewriteEngine On
NameVirtualHost *:80
User michael
Group michael
httpd.conf
# forbid access to the entire filesystem by default
# <Directory />
# Options None
# AllowOverride None
# Order deny,allow
# Deny from all
# </Directory>
# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>