Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Document root on different drive, now modules dont work?

Status
Not open for further replies.

ElliotP

IS-IT--Management
Joined
Sep 17, 2004
Messages
4
Location
GB
Hey guys,

Need a bit of help. Ive installed Apache2 on a Win2k3 Server machine, i want to set the documentroot to a differnt drive, but for some reason it causes an internal server error.

I traced the problem to the modules in .htaccess, if i remove mod_rewrite from .htaccess then it works fine.

Modules work fine if the root is set to the C:\ drive (the drive windows and apache is installed on) but if i use the D:\ drive the modules cause an internal server error.

Ive searched google exentivley, with no avail, has any one come accross this before or know of a possible solution?

Many thanks, Elliot Pearse.
 
Just had a look at the error log:

[Mon Sep 20 10:10:26 2004] [alert] [client 192.168.0.42] D:/htdocs/stayaround/.htaccess: Invalid command '[QSA]', perhaps mis-spelled or defined by a module not included in the server configuration
[Mon Sep 20 10:10:26 2004] [error] [client 192.168.0.42] File does not exist: D:/htdocs/other.html

So it seems its not finding mod_rewrite.

I had a scour around google and found a bit out about it, although i have no clue about the directory block in the httpd.conf (i assume the problem is i need to use a directory block to show apache where mod_rewrite is?)

This is the directory block im using:

<Directory "D:/">
Options Indexes FollowSymLinks Multiviews
Order allow,deny
Allow from all
AllowOverride All
</Directory>

Any help as always much appriceated.

Elliot.
 
ElliotP,

If I understand your situation correctly, all of your Apache files are currently on C: and you want to set D:\htdocs as your DocumentRoot.

Do you have any files that you need to use in the root directory of D:?

If not, try changing the above directory to D:/htdocs/. Your Apache modules should be located on C:, which may be causing the problem if you use any .htaccess directives.

Wishdiak
 
Thanks for the reply Wishdiak.

Indeed you understand perfectly what im trying to do.

I tried changing the directory block as you suggested, restarted apache, and even restarted the whole machine, but it had no effect. Pages with a htaccess file that use mod_rewrite still dont function, but sites without mod_rewrite calls function fine.

Thanks for the suggestion and keep them coming.

Elliot.

 
ElliotP,

I'm glad that I understand the situation correctly. What do you have specified as your DocumentRoot in httpd.conf?

Wishdiak
 
Sorry for delayed reply, was a way on business yesterday.

DocumentRoot "D:\htdocs"

<Directory "D:\htdocs">

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top