Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Nginx rewrite
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Nginx rewrite

24khost24khost Member
edited January 2013 in Help

okay i got the replacement rules but do they have to go in the config file or is there like with apache an htaccess file type deal.

rewrite /(^index/redirect.+)$ /index.php;
rewrite /!(^install)|(^blank.html)|.(mp3|swf|js|ico|gif|jpg|png|css)$ /index.php;

Comments

  • jhjh Member

    They go in the config file. There is no .htaccess equivalent in Nginx.

  • that just sucks. The reason I ask is that there is a new cpanel plugin out there that gives people the ability to use nginx instead of apache but they can't edit thier own rewrite rules.

  • jhjh Member

    Yeah I've got the same problem and it's very frustrating. I didn't want to use Apache but needed the .htaccess support so normal users can make changes. AFAIK the only option is Litespeed :/

  • So use Lighty instead.

  • It is a great new plugin called cpXstack which is awesome cause the customer can choose, which sites get it.

  • @jhadley can you include the rewrites from a file in thier directory?

  • @kbeezie maybe he can shed some light on my idea.

  • @24khost said: cpXstack

    It looks like -- from the video on the front page -- that users should be able to throw in/edit rewrite rules directly from cPanel.

  • I got that but it doesn't seem to be working

  • @24khost said: @jhadley can you include the rewrites from a file in thier directory?

    You could potentially do it, but a problem you'd discover is that on re/start, nginx checks for syntatically correctness in every file included. Any syntax errors would cause nginx to error out and not be able to start. If you're running separate nginx instances for each client, you'd have no issue. However, if the same instance of nginx is being run for everything, one bad config file can ruin it for everyone.

Sign In or Register to comment.