2

I would like to improve Drupal 7 and overall server performance by setting apache/2 without .htaccess files. How to configure apache/2 httpd.conf to achieve this?

8

You should be able to take the contents of the .htaccess file, and place them in your httpd.conf. Exactly where depends on how you have your site running in Apache.

If you are using a virtual host, you would place everything inside a <Directory> section that matches your DocumentRoot, inside your <VirtualHost> section for the site.

If you aren't using a virtual host, then everything would (probably) still go in a <Directory> section that matches your DocumentRoot, but I can't remember the last time I didn't use a virtual host, even for servers with a single website on them.

You may get better answers over on ServerFault, as this isn't totally Drupal specific.

2

In a directory section that refers to your Drupal installation, you can do the following:

<Directory ...>
AllowOverride None
...paste contents of Drupal .htaccess here...
</Directory>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.