Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Is it possible to run Grav without the htaccess file?

Started by Muut Archive 11 years ago · 6 replies · 589 views
11 years ago

I tried to run Grav using an apache config file but the Grav error screen came up and told me my htaccess file was missing and wouldn't load the site. Can I tell it to run without htaccess?

11 years ago

Not if you want to have any routing. You just need to ensure the .htaccess file is there. It's included in the zip file. If you manually copied the files from the zip to another location, and don't have hidden files visible, you might of missed it.

The best option is to extract the zip file directly into the webroot or subdirectory where you intend to use it.

11 years ago

Yeah its fine, I took it out cause I wanted to run it without an htaccess to stop the requests that occur (i.e. apache checks every single directory for every request). It's not really an issue as the sites I'm using for Grav aren't getting 1000 hits a second, but I just wanted to see if it would work. The problem with having it there and blank is apache still then checks every directory per request - apache themselves recommend not using it for performance issues on large traffic sites - http://wiki.apache.org/httpd/Htaccess

11 years ago

Frankly you are not going to see any real issue with performance with Grav (even with an .htaccess). We've focused on performance and optimizations from the very start. I think you'll find it's about the most efficient and performant CMS out there.

If your concerned with performance try Nginx. I can get well over 700req/sec on my mac with a Grav site under Nginx, and even over 500req/sec with Apache 2.4.

11 years ago

Yep thanks. As I said, I was speculating - I don't actually think it will ever be an issue. Just playing around. And yes, Grav is the fastest thing I've ever used.

Thanks!

11 years ago

One other thing I didn't mention because i've never tried it, is you can move the htaccess rules into the apache configuration files, specifically a vhost section. Then you can turn off allow overrides to stop any .htaccess from even getting picked up.

This is the preferred approach for optimal performance, but i doubt you would see much if any real world difference. Your getting into nit-picking territory :) Nginx is a better option if your considering this.

11 years ago

Agreed :D

Apache is the lazy man's web server though :D so I probably shouldn't be nit-picking

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1323 9 years ago
Archive · by Muut Archive, 9 years ago
2 920 9 years ago
Archive · by Muut Archive, 9 years ago
2 4048 9 years ago
Archive · by Muut Archive, 9 years ago
1 2924 9 years ago
Archive · by Muut Archive, 9 years ago
3 1106 9 years ago