Jump to content
tillkrueger

.htaccess files and Nginx

3 posts in this topic Last Reply

Recommended Posts

since I don't seem to be able to get a response in the letsencrypt support thread, and time is running out on my hosting plan at Bluehost, I am hoping to get somewhere here in the more general forum.

4 days ago I posted a question in the letsencrypt support thread, about how Nginx in the letsencrypt docker can be made to do what the .htaccess files on Apache does.

My programmer is moving a database driven php application/site of mine from Bluehost to my unRAID server, running the letsencrypt and mariadb dockers, and had this .htaccess file:

<ifmodule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</ifmodule>

he then realised and told me that Nginx does not read/obey .htaccess.

I think he said that he needs to enable mod_rewrite.

does anyone know how this can be accomplished with Nginx?
I hope to find an answer soon, as I don't want to have to pay for yet another month of Bluehost cloud hosting. 😕

Share this post


Link to post

Respectfully, this is a question that should be posed to the authors of nginx itself, not unraid or the docker authors.

 

If you are paying for your programmer to do this transition, it's something they should be handling, not asking you to do their homework for them.

 

10 seconds of googling got me here, maybe that will help?

https://serverfault.com/questions/366152/what-is-nginx-equalant-for-my-htaccess-mod-rewrite

Share this post


Link to post

I hear ya, jonathanm...I'm also a bit frustrated with him, but since I can't afford any better than a 10$/hr Indian hack, at the moment, I do have to do some of the homework if need be.

I also found a couple of links like that, which I sent him, but he appears to be in over his head...might have to find someone else with Nginx experience soon, if this doesn't get resolved soon.

Thanks for the link.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now