dpcamp
March 6th, 2009, 07:09 PM
I'm trying to get mod_rewrite working on my server. And when I change AllowOverride None to all it breaks my site (well at least php functionality)
Anyone know why?
here is my 000-default configuration:
NameVirtualHost *
<VirtualHost *>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/htdocs/
<Directory /var/www/htdocs/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
<Directory /var/www/htdocs/apps>
Options Indexes FollowSymLinks MultiViews +Includes
AllowOverride None
Order allow,deny
Allow from all
SetHandler mono
DirectoryIndex index.aspx index.html index.shtml
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</Directory>
Alias /apps "/var/www/htdocs/apps"
AddMonoApplications apps "/apps:/var/www/htdocs/apps"
<location /apps>
SetHandler mono
</location>
</VirtualHost>
maybe this has to do with my .htaccess file?
ErrorDocument 404 http://www.mydomain.com/error/404.php
php_value auto_prepend_file /localfilepath/global_prepend.php
php_value auto_append_file /localfilepath/global_append.php
This is giving me the following error:
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required '/localfilepath/global_prepend.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
Anyone know why?
here is my 000-default configuration:
NameVirtualHost *
<VirtualHost *>
ServerName localhost
ServerAdmin webmaster@localhost
DocumentRoot /var/www/htdocs/
<Directory /var/www/htdocs/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
#RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
<Directory /var/www/htdocs/apps>
Options Indexes FollowSymLinks MultiViews +Includes
AllowOverride None
Order allow,deny
Allow from all
SetHandler mono
DirectoryIndex index.aspx index.html index.shtml
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
</Directory>
Alias /apps "/var/www/htdocs/apps"
AddMonoApplications apps "/apps:/var/www/htdocs/apps"
<location /apps>
SetHandler mono
</location>
</VirtualHost>
maybe this has to do with my .htaccess file?
ErrorDocument 404 http://www.mydomain.com/error/404.php
php_value auto_prepend_file /localfilepath/global_prepend.php
php_value auto_append_file /localfilepath/global_append.php
This is giving me the following error:
Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
Fatal error: Unknown: Failed opening required '/localfilepath/global_prepend.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0