Difference between revisions of "How to add a subdirectory that runs PHP scripts"

From EPrints Documentation
Jump to: navigation, search
Line 2: Line 2:
  
 
===Edit [eprint install dir]/archives/[archive]/cfg/cfg.d/[[urls.pl]]===
 
===Edit [eprint install dir]/archives/[archive]/cfg/cfg.d/[[urls.pl]]===
 
 
Amend this line to include the directory you want to make an exception for.   
 
Amend this line to include the directory you want to make an exception for.   
  
 +
Here we are adding the directory /blog/ to the array.
 
  $c->{[[rewrite_exceptions]]} = [ '/cgi/', '/archive/', ''''/blog/''''];
 
  $c->{[[rewrite_exceptions]]} = [ '/cgi/', '/archive/', ''''/blog/''''];
  
Here we are adding the directory /blog/ to the array.
+
Save and close.
  
 
===Edit: [eprint install dir]/archives/[archive]/cfg/[[apachevhost.conf]]===
 
===Edit: [eprint install dir]/archives/[archive]/cfg/[[apachevhost.conf]]===

Revision as of 21:33, 18 February 2010

In this example, we are adding a blog directory, perhaps to host wordpress.

Edit [eprint install dir]/archives/[archive]/cfg/cfg.d/urls.pl

Amend this line to include the directory you want to make an exception for.

Here we are adding the directory /blog/ to the array.

$c->{rewrite_exceptions} = [ '/cgi/', '/archive/', '/blog/'];

Save and close.

Edit: [eprint install dir]/archives/[archive]/cfg/apachevhost.conf

And add the following.

  Alias /blog/ /path/to/blog/
  <Location "/blog">
     AddHandler php5-script php
     DirectoryIndex index.php
  </Location> 
  <Directory /path/to/blog>
     Order allow,deny
     Allow from all
  </Directory>

Restart Apache