homepage Welcome to WebmasterWorld Guest from 50.17.107.233
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
mod rewrite
need help on configuration...
Reilly




msg:3709213
 2:10 pm on Jul 28, 2008 (gmt 0)

hello,

first sorry for my bad english, but i'm disperated and i need help.
I need to use mod_rewrite - i never used it before - and i'm a real newbie. I installed today the Mod_Rewrite Modul on my Apache Server and when i open phpinfo.php it shows


Loaded Modules core prefork http_core mod_so mod_access mod_actions mod_alias mod_auth mod_auth_dbm mod_autoindex mod_cgi mod_dir mod_env mod_expires mod_include mod_log_config mod_mime mod_negotiation mod_setenvif mod_ssl mod_suexec mod_userdir sapi_apache2 mod_rewrite

so it seems to be loaded - ok that's fine - then i'm gone to the httpd.conf and i changed the Line

AllowOverride None

into

AllowOverride All

but each attemped to rewrite urls brings on a 500 Error and when i add

Options +FollowSymlinks

brings an 403 Error - do i missed something - what'S wrong - i'm desperated ... :(

 

jdMorgan




msg:3709226
 2:24 pm on Jul 28, 2008 (gmt 0)

What is shown in your server error log when you get a 500 and/or 403 error?

Jim

Reilly




msg:3709242
 2:39 pm on Jul 28, 2008 (gmt 0)


[Mon Jul 28 14:09:44 2008] [error] [client 79.39.34.164] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /srv/www/htdocs/web3/html/


[Mon Jul 28 14:36:45 2008] [alert] [client 79.39.34.164] /srv/www/htdocs/web3/html/.htaccess: Options not allowed here

i'm not a pro - but i'm not fallen on the head :D - i will try everything - i need only a hint - damn, that my english isn't good - so i can't explain - but you are my only help - i do not know where to go elsewhere - please help me...

[edited by: Reilly at 2:52 pm (utc) on July 28, 2008]

jdMorgan




msg:3709280
 3:12 pm on Jul 28, 2008 (gmt 0)

From what you have posted, it looks like all you need is a server restart.

After you change httpd.conf, conf.d, or any other server-level config file, you must restart your server for the change to take effect.

Jim

Reilly




msg:3709293
 3:20 pm on Jul 28, 2008 (gmt 0)

i have done a apache2 restart


/etc/init.d/apache2 restart

or what do you mean ?

jdMorgan




msg:3709350
 4:12 pm on Jul 28, 2008 (gmt 0)

OK, you restarted your server. In that case, it looks like the "AllowOverrides All" directive is in the wrong place. It must be in a container that applies to the directory where your .htaccess file resides, such as a <VirtualHost> or <Directory> container. Make sure that there is not another lower-level container that overrides that setting. For example, with AllowOverrides All in <VirtualHost> and AllowOverrides None in <Directory>, no overrides will be allowed in .htaccess, and the Options directive will not be allowed.

Jim

Reilly




msg:3709376
 4:35 pm on Jul 28, 2008 (gmt 0)


# forbid access to the entire filesystem by default
<Directory />
Options +FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
</Directory>

ok i understood what you want me to explain - that i overwrite my settings - but i'm not common with that httpd.conf File - how can i copy the Text in this file - to let you view it - so you can say me what's wrong - Mister Morgan - thanks that you are trying to help me - i appreciate it really - thanks so much


[Mon Jul 28 18:40:12 2008] [error] [client 79.39.34.164] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /srv/www/htdocs/web3/html/

403 Error


### Global Environment ######################################################
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests.

# run under this user/group id
Include /etc/apache2/uid.conf

# - how many server processes to start (server pool regulation)
# - usage of KeepAlive
Include /etc/apache2/server-tuning.conf

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
ErrorLog /var/log/apache2/error_log

# generated from APACHE_MODULES in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/loadmodule.conf

# IP addresses / ports to listen on
Include /etc/apache2/listen.conf

# predefined logging formats
Include /etc/apache2/mod_log_config.conf

# generated from global settings in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/global.conf

# optional mod_status, mod_info
Include /etc/apache2/mod_status.conf
Include /etc/apache2/mod_info.conf

# optional cookie-based user tracking
# read the documentation before using it!
Include /etc/apache2/mod_usertrack.conf

# configuration of server-generated directory listings
Include /etc/apache2/mod_autoindex-defaults.conf

# associate MIME types with filename extensions
TypesConfig /etc/apache2/mime.types
DefaultType text/plain
Include /etc/apache2/mod_mime-defaults.conf

# set up (customizable) error responses
# set up (customizable) error responses
Include /etc/apache2/errors.conf

# global (server-wide) SSL configuration, that is not specific to
# any virtual host
Include /etc/apache2/ssl-global.conf

# forbid access to the entire filesystem by default
<Directory />
Options +FollowSymLinks
AllowOverride All
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>

# List of resources to look for when the client requests a directory
DirectoryIndex index.html index.html.var

### 'Main' server configuration #############################################
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#
Include /etc/apache2/default-server.conf

# Another way to include your own files
#
# The file below is generated from /etc/sysconfig/apache2,
# include arbitrary files as named in APACHE_CONF_INCLUDE_FILES and
# APACHE_CONF_INCLUDE_DIRS
Include /etc/apache2/sysconfig.d/include.conf
### Virtual server configuration ############################################
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.
#
Include /etc/apache2/vhosts.d/*.conf

# Note: instead of adding your own configuration here, consider
# adding it in your own file (/etc/apache2/httpd.conf.local)
# putting its name into APACHE_CONF_INCLUDE_FILES in
# /etc/sysconfig/apache2 -- this will make system updates
# easier :)
## CONFIXX
<Directory "/srv/www/htdocs/confixx/html">
Options +FollowSymLinks
AllowOverride All
</Directory>
NameVirtualHost #*$!.#*$!.#*$!.#*$!:80
<VirtualHost #*$!.#*$!.#*$!.#*$!:80>
ServerName #*$!#*$!#*$!.#*$!#*$!#*$!.de
Alias /phpmyadmin /srv/www/htdocs/phpMyAdmin
#User confixx
#Group users
DocumentRoot /srv/www/htdocs/confixx/html
php_admin_value safe_mode_exec_dir /srv/www/htdocs/confixx/bin
php_admin_value upload_tmp_dir /srv/www/htdocs/confixx/tmp
php_admin_value open_basedir none
#php_admin_value safe_mode off
ScriptAlias /cgi-bin/ /srv/www/htdocs/confixx/html/cgi-bin/
CustomLog /var/log/apache2/confixx_access.log "\%h \%l \%u \%t \"\%r\" \%s \%b \"\%{Referer}i\" \"\%{User-agent}i\""
ErrorLog /var/log/apache2/confixx_error.log
</VirtualHost>
Include /etc/apache2/confixx_vhost.conf

# ^- Dieser Eintrag sollte unbedingt am Ende der Datei bleiben
## /CONFIXX

[edited by: Reilly at 4:54 pm (utc) on July 28, 2008]

jdMorgan




msg:3709567
 7:02 pm on Jul 28, 2008 (gmt 0)

Consider moving your second <Directory> container inside your <VirtualHost> container. The first <Directory> container is misplaced, and appears to be redundant.

Jim

Reilly




msg:3710002
 6:31 am on Jul 29, 2008 (gmt 0)

hello Jim,

with this file was everything ok, that was a Confixx PRoblem , i got resolved it - and i changed some settings in the confixx_vhost.conf - and now all is running cool - thanks so much for your help Jim - i will never forget it - Thanks so much...

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved