Changes

Jump to: navigation, search

Package:Apache

791 bytes added, 6 years ago
m
add mod_rewrite testing setup
httpd.conf controls how the server behaves, at the bottom of the file it has directives to include configuration files ending in .conf in /etc/apache2/modules.d & /etc/apache2/vhosts.d
 
 
{{file|name=/etc/portage/make.conf|desc=set system wide apache2 useflag|body=
USE="apache2 ..........."
}}
== Service ==
To start apache upon boot:
<console>###i## rc-update add apache2</console>
 
== mod_rewrite ==
 
mod_rewrite has a reputation of being difficult to set up. mod_rewrite requires following symlinks & Order allow,deny (apache 2.2) or Require all granted (apache 2.4) is set. To test functionality of mod_rewrite we will need to make a few files.
 
{{fancynote|If you want to test this for web applications such as mediawiki adjust the path to /var/www/localhost/htdocs/mediawiki/.htaccess & so on}}
 
{{file|name=/var/www/localhost/htdocs/.htaccess|desc=enable the rewrite engine|body=
RewriteEngine on
RewriteRule ^test.html$ rewrite.html
}}
 
{{file|name=/var/www/localhost/htdocs/test.html|desc=set system wide apache2 useflag|body=
rewrite is not working
}}
 
{{file|name=/var/www/localhost/htdocs/rewrite.html|desc=set system wide apache2 useflag|body=
rewrite is working
}}
 
Then point your browser @ http://127.0.0.1/test.html the text from rewrite.html should be loaded.
 
{{EbuildFooter}}
wiki-moderators
749
edits

Navigation menu